Re: block-rbd: One function call less in rbd_dev_probe_parent() after error detection
From: SF Markus Elfring
Date: Thu Nov 26 2015 - 02:55:13 EST
>> I interpreted the eventual passing of a null pointer to the rbd_dev_destroy()
>> function as an indication for further source code adjustments.
>
> If all error paths could be adjusted so that NULL pointers are never passed in,
> destroy functions wouldn't need to have a NULL check, would they?
How do you think about to clarify corresponding implementation details a bit more?
* Why was the function "rbd_dev_probe_parent" implemented in the way
that it relies on a sanity check in the function "rbd_dev_destroy" then?
* How are the chances to restructure the source code a bit (like changing a few
jump labels) so that it should also work without an extra function call
during error handling there?
Regards,
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/