diff options
author | Daniel Stodden <daniel.stodden@citrix.com> | 2010-08-07 18:47:26 +0200 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 18:47:26 +0200 |
commit | acfca3c622a009fb62b566604452ab9fb3a11019 (patch) | |
tree | 3125607a3f41283839605d18f004765d0268e5d5 /drivers/block | |
parent | fa1bd3591a669b92b635dbdb11d1a32a5630821b (diff) | |
download | op-kernel-dev-acfca3c622a009fb62b566604452ab9fb3a11019.zip op-kernel-dev-acfca3c622a009fb62b566604452ab9fb3a11019.tar.gz |
blkfront: Remove obsolete info->users
This is just bd_openers, protected by the bd_mutex.
Signed-off-by: Daniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/xen-blkfront.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 715de7d..9c5a25a 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -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; @@ -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. @@ -1212,7 +1210,6 @@ static int blkif_release(struct gendisk *disk, fmode_t mode) kfree(info); } -out: unlock_kernel(); return 0; } |