Re: [PATCH 1/2] block: make __register_blkdev() return an error

From
Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Date
2021-09-07 15:23:17
Reply to
Luis Chamberlain, 2021-09-07
On 2021/09/07 23:57, Luis Chamberlain wrote:
quoted
Actually, blk_request_module() failures should be ignored, for
subsequent ilookup() will fail if blk_request_module() failed to
create the requested block device.
Then how about this:

Since we would like to use __must_check for add_disk() we proceed with
the change to capture the errors and propagate them and we just document on
fs/block_dev.c's use of blk_request_module() about the above issue and
how we prefer the errror that ilookup() would return.
Marking add_disk() as __must_check makes it possible to enforce "don't leave
partially initialized devices". That's already an enough improvement.

Probe functions can remain "void", and hence blk_request_module() can remain "void".
That is, I would drop "[PATCH 1/2] block: make __register_blkdev() return an error".
Thread (11 messages) 11 messages, 3 authors, last reply 2021-09-08
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help