summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorDaniel Stodden <daniel.stodden@citrix.com>2010-04-30 22:01:23 +0000
committerJens Axboe <jaxboe@fusionio.com>2010-08-07 18:49:20 +0200
commit7b32d1044ae791a1e53a53023bf2668438d5301b (patch)
tree8e751d41c7754f8b89eb4076ae76e2e7b028f152 /drivers/block
parentacfca3c622a009fb62b566604452ab9fb3a11019 (diff)
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.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 9c5a25a462e6..b01167b6207a 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -96,12 +96,6 @@ struct blkfront_info
unsigned long shadow_free;
int feature_barrier;
int is_ready;
-
- /**
- * The number of people holding this device open. We won't allow a
- * hot-unplug unless this is 0.
- */
- int users;
};
static DEFINE_SPINLOCK(blkif_io_lock);
@@ -977,7 +971,7 @@ blkfront_closing(struct blkfront_info *info)
mutex_lock(&bdev->bd_mutex);
- if (info->users) {
+ if (bdev->bd_openers) {
xenbus_dev_error(xbdev, -EBUSY,
"Device in use; refusing to close");
xenbus_switch_state(xbdev, XenbusStateClosing);
@@ -1126,7 +1120,7 @@ static int blkfront_remove(struct xenbus_device *xbdev)
mutex_lock(&bdev->bd_mutex);
info = disk->private_data;
- if (info && !info->users) {
+ if (info && !bdev->bd_openers) {
xlvbd_release_gendisk(info);
disk->private_data = NULL;
kfree(info);