diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2009-04-07 13:48:21 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-07 13:48:21 +0200 |
commit | ffcd7dca3ab78f9f425971756e5e90024157f6be (patch) | |
tree | 777753013a09b5de8938a9b1af1c1b6ac5147635 /drivers/block/loop.c | |
parent | b029195dda0129b427c6e579a3bb3ae752da3a93 (diff) | |
download | kernel_samsung_aries-ffcd7dca3ab78f9f425971756e5e90024157f6be.zip kernel_samsung_aries-ffcd7dca3ab78f9f425971756e5e90024157f6be.tar.gz kernel_samsung_aries-ffcd7dca3ab78f9f425971756e5e90024157f6be.tar.bz2 |
loop: mutex already unlocked in loop_clr_fd()
mount/1865 is trying to release lock (&lo->lo_ctl_mutex) at:
but there are no more locks to release!
mutex is already unlocked in loop_clr_fd(), we should not
try to unlock it in lo_release() again.
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/loop.c')
-rw-r--r-- | drivers/block/loop.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 40b17d3..ddae808 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1431,6 +1431,7 @@ static int lo_open(struct block_device *bdev, fmode_t mode) static int lo_release(struct gendisk *disk, fmode_t mode) { struct loop_device *lo = disk->private_data; + int err; mutex_lock(&lo->lo_ctl_mutex); @@ -1442,7 +1443,9 @@ static int lo_release(struct gendisk *disk, fmode_t mode) * In autoclear mode, stop the loop thread * and remove configuration after last close. */ - loop_clr_fd(lo, NULL); + err = loop_clr_fd(lo, NULL); + if (!err) + goto out_unlocked; } else { /* * Otherwise keep thread (if running) and config, @@ -1453,7 +1456,7 @@ static int lo_release(struct gendisk *disk, fmode_t mode) out: mutex_unlock(&lo->lo_ctl_mutex); - +out_unlocked: return 0; } |