Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208289
b: refs/heads/master
c: 7b32d10
h: refs/heads/master
i:
  208287: ddd5afe
v: v3
  • Loading branch information
Daniel Stodden authored and Jens Axboe committed Aug 7, 2010
1 parent dffcb54 commit 7f65fcf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 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: acfca3c622a009fb62b566604452ab9fb3a11019
refs/heads/master: 7b32d1044ae791a1e53a53023bf2668438d5301b
10 changes: 2 additions & 8 deletions trunk/drivers/block/xen-blkfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 7f65fcf

Please sign in to comment.