diff options
author | Daniel Stodden <daniel.stodden@citrix.com> | 2010-04-30 18:01:23 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-08-07 12:49:20 -0400 |
commit | 7b32d1044ae791a1e53a53023bf2668438d5301b (patch) | |
tree | 8e751d41c7754f8b89eb4076ae76e2e7b028f152 /drivers/block/xen-blkfront.c | |
parent | acfca3c622a009fb62b566604452ab9fb3a11019 (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/xen-blkfront.c')
-rw-r--r-- | drivers/block/xen-blkfront.c | 10 |
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 | |||
96 | unsigned long shadow_free; | 96 | unsigned long shadow_free; |
97 | int feature_barrier; | 97 | int feature_barrier; |
98 | int is_ready; | 98 | int is_ready; |
99 | |||
100 | /** | ||
101 | * The number of people holding this device open. We won't allow a | ||
102 | * hot-unplug unless this is 0. | ||
103 | */ | ||
104 | int users; | ||
105 | }; | 99 | }; |
106 | 100 | ||
107 | static DEFINE_SPINLOCK(blkif_io_lock); | 101 | static DEFINE_SPINLOCK(blkif_io_lock); |
@@ -977,7 +971,7 @@ blkfront_closing(struct blkfront_info *info) | |||
977 | 971 | ||
978 | mutex_lock(&bdev->bd_mutex); | 972 | mutex_lock(&bdev->bd_mutex); |
979 | 973 | ||
980 | if (info->users) { | 974 | if (bdev->bd_openers) { |
981 | xenbus_dev_error(xbdev, -EBUSY, | 975 | xenbus_dev_error(xbdev, -EBUSY, |
982 | "Device in use; refusing to close"); | 976 | "Device in use; refusing to close"); |
983 | xenbus_switch_state(xbdev, XenbusStateClosing); | 977 | xenbus_switch_state(xbdev, XenbusStateClosing); |
@@ -1126,7 +1120,7 @@ static int blkfront_remove(struct xenbus_device *xbdev) | |||
1126 | mutex_lock(&bdev->bd_mutex); | 1120 | mutex_lock(&bdev->bd_mutex); |
1127 | info = disk->private_data; | 1121 | info = disk->private_data; |
1128 | 1122 | ||
1129 | if (info && !info->users) { | 1123 | if (info && !bdev->bd_openers) { |
1130 | xlvbd_release_gendisk(info); | 1124 | xlvbd_release_gendisk(info); |
1131 | disk->private_data = NULL; | 1125 | disk->private_data = NULL; |
1132 | kfree(info); | 1126 | kfree(info); |