Messages in this thread | | | Subject | Re: block-rbd: One function call less in rbd_dev_probe_parent() after error detection | From | SF Markus Elfring <> | Date | Thu, 26 Nov 2015 08:54:45 +0100 |
| |
>> 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
| |