Commit 70f87d94 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Stefan Bader

Revert "loop: Fix double mutex_unlock(&loop_ctl_mutex) in loop_control_ioctl()"

BugLink: https://bugs.launchpad.net/bugs/1818803

This reverts commit 9ec298cc which is
commit 628bd859 upstream.

It is not needed in the 4.4.y tree at this point in time.
Reported-by: default avatarJan Kara <jack@suse.cz>
Cc: Ming Lei <ming.lei@redhat.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJuerg Haefliger <juergh@canonical.com>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
parent efde168f
...@@ -1992,10 +1992,12 @@ static long loop_control_ioctl(struct file *file, unsigned int cmd, ...@@ -1992,10 +1992,12 @@ static long loop_control_ioctl(struct file *file, unsigned int cmd,
break; break;
if (lo->lo_state != Lo_unbound) { if (lo->lo_state != Lo_unbound) {
ret = -EBUSY; ret = -EBUSY;
mutex_unlock(&loop_ctl_mutex);
break; break;
} }
if (atomic_read(&lo->lo_refcnt) > 0) { if (atomic_read(&lo->lo_refcnt) > 0) {
ret = -EBUSY; ret = -EBUSY;
mutex_unlock(&loop_ctl_mutex);
break; break;
} }
lo->lo_disk->private_data = NULL; lo->lo_disk->private_data = NULL;
......
Markdown is supported
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