提交 acfca3c6 编写于 作者: D Daniel Stodden 提交者: Jens Axboe

blkfront: Remove obsolete info->users

This is just bd_openers, protected by the bd_mutex.
Signed-off-by: NDaniel Stodden <daniel.stodden@citrix.com>
Signed-off-by: NJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
上级 fa1bd359
...@@ -1168,9 +1168,6 @@ static int blkif_open(struct block_device *bdev, fmode_t mode) ...@@ -1168,9 +1168,6 @@ static int blkif_open(struct block_device *bdev, fmode_t mode)
mutex_unlock(&info->mutex); mutex_unlock(&info->mutex);
if (!err)
++info->users;
out: out:
unlock_kernel(); unlock_kernel();
return err; return err;
...@@ -1183,12 +1180,13 @@ static int blkif_release(struct gendisk *disk, fmode_t mode) ...@@ -1183,12 +1180,13 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
struct xenbus_device *xbdev; struct xenbus_device *xbdev;
lock_kernel(); lock_kernel();
if (--info->users)
goto out;
bdev = bdget_disk(disk, 0); bdev = bdget_disk(disk, 0);
bdput(bdev); bdput(bdev);
if (bdev->bd_openers)
goto out;
/* /*
* Check if we have been instructed to close. We will have * Check if we have been instructed to close. We will have
* deferred this request, because the bdev was still open. * deferred this request, because the bdev was still open.
...@@ -1212,7 +1210,6 @@ static int blkif_release(struct gendisk *disk, fmode_t mode) ...@@ -1212,7 +1210,6 @@ static int blkif_release(struct gendisk *disk, fmode_t mode)
kfree(info); kfree(info);
} }
out:
unlock_kernel(); unlock_kernel();
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册