loop: Split setting of lo_state from loop_clr_fd
authorJan Kara <jack@suse.cz>
Thu, 8 Nov 2018 13:01:06 +0000 (14:01 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2019 20:40:37 +0000 (21:40 +0100)
commit18974320825eba3d303b23cf7ef220714e4d6b5b
tree44374c498cf153497c4196478ee962e960870fa3
parentb8463897a29464d185cb7d3732da15e51cf086a3
loop: Split setting of lo_state from loop_clr_fd

commit a2505b799a496b7b84d9a4a14ec870ff9e42e11b upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/loop.c