lkml.org 
[lkml]   [2015]   [Nov]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: block-rbd: One function call less in rbd_dev_probe_parent() after error detection
From
Date
>> 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


\
 
 \ /
  Last update: 2015-11-26 09:21    [W:1.027 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site