Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142746
b: refs/heads/master
c: ffcd7dc
h: refs/heads/master
v: v3
  • Loading branch information
Alexander Beregalov authored and Jens Axboe committed Apr 7, 2009
1 parent af9b9f2 commit ac98415
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: b029195dda0129b427c6e579a3bb3ae752da3a93
refs/heads/master: ffcd7dca3ab78f9f425971756e5e90024157f6be
7 changes: 5 additions & 2 deletions trunk/drivers/block/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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,
Expand All @@ -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;
}

Expand Down

0 comments on commit ac98415

Please sign in to comment.