Skip to content
Commit f7bf3586 authored by Tetsuo Handa's avatar Tetsuo Handa Committed by Jens Axboe
Browse files

brd: reduce the brd_devices_mutex scope

As with commit 8b52d8be ("loop: reorder loop_exit"),
unregister_blkdev() needs to be called first in order to avoid calling
brd_alloc() from brd_probe() after brd_del_one() from brd_exit(). Then,
we can avoid holding global mutex during add_disk()/del_gendisk() as with
commit 1c500ad7

 ("loop: reduce the loop_ctl_mutex scope").

Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/e205f13d-18ff-a49c-0988-7de6ea5ff823@i-love.sakura.ne.jp


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent c4110804
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment