Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208288
b: refs/heads/master
c: acfca3c
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Stodden authored and Jens Axboe committed Aug 7, 2010
1 parent ddd5afe commit dffcb54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 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: fa1bd3591a669b92b635dbdb11d1a32a5630821b
refs/heads/master: acfca3c622a009fb62b566604452ab9fb3a11019
9 changes: 3 additions & 6 deletions trunk/drivers/block/xen-blkfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -1168,9 +1168,6 @@ static int blkif_open(struct block_device *bdev, fmode_t mode)

mutex_unlock(&info->mutex);

if (!err)
++info->users;

out:
unlock_kernel();
return err;
Expand All @@ -1183,12 +1180,13 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
struct xenbus_device *xbdev;

lock_kernel();
if (--info->users)
goto out;

bdev = bdget_disk(disk, 0);
bdput(bdev);

if (bdev->bd_openers)
goto out;

/*
* Check if we have been instructed to close. We will have
* deferred this request, because the bdev was still open.
Expand All @@ -1212,7 +1210,6 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
kfree(info);
}

out:
unlock_kernel();
return 0;
}
Expand Down

0 comments on commit dffcb54

Please sign in to comment.