From 7f65fcfd64f0476a15c51500d0a33bc2ce4a41f8 Mon Sep 17 00:00:00 2001 From: Daniel Stodden Date: Fri, 30 Apr 2010 22:01:23 +0000 Subject: [PATCH] --- yaml --- r: 208289 b: refs/heads/master c: 7b32d1044ae791a1e53a53023bf2668438d5301b h: refs/heads/master i: 208287: ddd5afebfb853a7a0a13c0c518c08da3aa47a167 v: v3 --- [refs] | 2 +- trunk/drivers/block/xen-blkfront.c | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index d1f847a9e638..c44924c7f503 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: acfca3c622a009fb62b566604452ab9fb3a11019 +refs/heads/master: 7b32d1044ae791a1e53a53023bf2668438d5301b diff --git a/trunk/drivers/block/xen-blkfront.c b/trunk/drivers/block/xen-blkfront.c index 9c5a25a462e6..b01167b6207a 100644 --- a/trunk/drivers/block/xen-blkfront.c +++ b/trunk/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);