loop: Push loop_ctl_mutex down into loop_clr_fd()
authorJan Kara <jack@suse.cz>
Thu, 8 Nov 2018 13:01:07 +0000 (14:01 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Nov 2018 13:30:19 +0000 (06:30 -0700)
commit7ccd0791d98531df7cd59e92d55e4f063d48a070
treed2344b6dcb605bd6d0c1d1af4fb8143f374b4d8d
parenta2505b799a496b7b84d9a4a14ec870ff9e42e11b
loop: Push loop_ctl_mutex down into loop_clr_fd()

loop_clr_fd() has a weird locking convention that is expects
loop_ctl_mutex held, releases it on success and keeps it on failure.
Untangle the mess by moving locking of loop_ctl_mutex into
loop_clr_fd().

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/loop.c