4.9-stable review patch. If anyone has any objections, please let me know.
------------------ From: Greg Kroah-Hartman <[email protected]> This reverts commit 5d3cf50105d007adc54949e0caeca1e944549723 which is commit 628bd85947091830a8c4872adfd5ed1d515a9cf2 upstream. It does not work properly in the 4.9.y tree and causes more problems than it fixes, so revert it. Reported-by: Thomas Lindroth <[email protected]> Reported-by: Jan Kara <[email protected]> Cc: syzbot <[email protected]> Cc: Ming Lei <[email protected]> Cc: Tetsuo Handa <[email protected]> Cc: Jens Axboe <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> --- drivers/block/loop.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1929,10 +1929,12 @@ static long loop_control_ioctl(struct fi break; if (lo->lo_state != Lo_unbound) { ret = -EBUSY; + mutex_unlock(&loop_ctl_mutex); break; } if (atomic_read(&lo->lo_refcnt) > 0) { ret = -EBUSY; + mutex_unlock(&loop_ctl_mutex); break; } lo->lo_disk->private_data = NULL;

