提交 a63c848b 编写于 作者: A Al Viro

[PATCH] switch xen

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 961846ca
...@@ -156,11 +156,10 @@ static int blkif_getgeo(struct block_device *bd, struct hd_geometry *hg) ...@@ -156,11 +156,10 @@ static int blkif_getgeo(struct block_device *bd, struct hd_geometry *hg)
return 0; return 0;
} }
static int blkif_ioctl(struct inode *inode, struct file *filep, static int blkif_ioctl(struct block_device *bdev, fmode_t mode,
unsigned command, unsigned long argument) unsigned command, unsigned long argument)
{ {
struct blkfront_info *info = struct blkfront_info *info = bdev->bd_disk->private_data;
inode->i_bdev->bd_disk->private_data;
int i; int i;
dev_dbg(&info->xbdev->dev, "command: 0x%x, argument: 0x%lx\n", dev_dbg(&info->xbdev->dev, "command: 0x%x, argument: 0x%lx\n",
...@@ -1014,16 +1013,16 @@ static int blkfront_is_ready(struct xenbus_device *dev) ...@@ -1014,16 +1013,16 @@ static int blkfront_is_ready(struct xenbus_device *dev)
return info->is_ready; return info->is_ready;
} }
static int blkif_open(struct inode *inode, struct file *filep) static int blkif_open(struct block_device *bdev, fmode_t mode)
{ {
struct blkfront_info *info = inode->i_bdev->bd_disk->private_data; struct blkfront_info *info = bdev->bd_disk->private_data;
info->users++; info->users++;
return 0; return 0;
} }
static int blkif_release(struct inode *inode, struct file *filep) static int blkif_release(struct gendisk *disk, fmode_t mode)
{ {
struct blkfront_info *info = inode->i_bdev->bd_disk->private_data; struct blkfront_info *info = disk->private_data;
info->users--; info->users--;
if (info->users == 0) { if (info->users == 0) {
/* Check whether we have been instructed to close. We will /* Check whether we have been instructed to close. We will
...@@ -1041,10 +1040,10 @@ static int blkif_release(struct inode *inode, struct file *filep) ...@@ -1041,10 +1040,10 @@ static int blkif_release(struct inode *inode, struct file *filep)
static struct block_device_operations xlvbd_block_fops = static struct block_device_operations xlvbd_block_fops =
{ {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.__open = blkif_open, .open = blkif_open,
.__release = blkif_release, .release = blkif_release,
.getgeo = blkif_getgeo, .getgeo = blkif_getgeo,
.ioctl = blkif_ioctl, .locked_ioctl = blkif_ioctl,
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册