Skip to content

Commit

Permalink
blkfront: Remove obsolete info->users
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Stodden authored and Jens Axboe committed Aug 7, 2010
1 parent fa1bd35 commit acfca3c
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/block/xen-blkfront.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand All @@ -1212,7 +1210,6 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
kfree(info);
}

out:
unlock_kernel();
return 0;
}
Expand Down

0 comments on commit acfca3c

Please sign in to comment.