Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233824
b: refs/heads/master
c: fd51469
h: refs/heads/master
v: v3
  • Loading branch information
Petr Uzel authored and Jens Axboe committed Mar 3, 2011
1 parent 32d182c commit 59e7677
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d3a8497f8cc5aca14b722cd37d51f6c15ff9f74
refs/heads/master: fd51469fb68b987032e46297e0a4fe9020063c20
5 changes: 0 additions & 5 deletions trunk/drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@

#include <asm/uaccess.h>

static DEFINE_MUTEX(loop_mutex);
static LIST_HEAD(loop_devices);
static DEFINE_MUTEX(loop_devices_mutex);

Expand Down Expand Up @@ -1501,11 +1500,9 @@ static int lo_open(struct block_device *bdev, fmode_t mode)
{
struct loop_device *lo = bdev->bd_disk->private_data;

mutex_lock(&loop_mutex);
mutex_lock(&lo->lo_ctl_mutex);
lo->lo_refcnt++;
mutex_unlock(&lo->lo_ctl_mutex);
mutex_unlock(&loop_mutex);

return 0;
}
Expand All @@ -1515,7 +1512,6 @@ static int lo_release(struct gendisk *disk, fmode_t mode)
struct loop_device *lo = disk->private_data;
int err;

mutex_lock(&loop_mutex);
mutex_lock(&lo->lo_ctl_mutex);

if (--lo->lo_refcnt)
Expand All @@ -1540,7 +1536,6 @@ static int lo_release(struct gendisk *disk, fmode_t mode)
out:
mutex_unlock(&lo->lo_ctl_mutex);
out_unlocked:
mutex_unlock(&loop_mutex);
return 0;
}

Expand Down

0 comments on commit 59e7677

Please sign in to comment.