loop: Split setting of lo_state from loop_clr_fd
commita2505b799a496b7b84d9a4a14ec870ff9e42e11b
authorJan Kara <jack@suse.cz>
Thu, 8 Nov 2018 13:01:06 +0000 (8 14:01 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Nov 2018 13:30:18 +0000 (8 06:30 -0700)
tree990cdcb77dc2f1af420e0b04e3f35b62f0539655
parenta13165441d58b216adbd50252a9cc829d78a6bce
loop: Split setting of lo_state from loop_clr_fd

Move setting of lo_state to Lo_rundown out into the callers. That will
allow us to unlock loop_ctl_mutex while the loop device is protected
from other changes by its special state.

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