Skip to content

Commit a63c848

Browse files
author
Al Viro
committed
[PATCH] switch xen
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 961846c commit a63c848

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

‎drivers/block/xen-blkfront.c‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,10 @@ static int blkif_getgeo(struct block_device *bd, struct hd_geometry *hg)
156156
return 0;
157157
}
158158

159-
static int blkif_ioctl(struct inode *inode, struct file *filep,
159+
static int blkif_ioctl(struct block_device *bdev, fmode_t mode,
160160
unsigned command, unsigned long argument)
161161
{
162-
struct blkfront_info *info =
163-
inode->i_bdev->bd_disk->private_data;
162+
struct blkfront_info *info = bdev->bd_disk->private_data;
164163
int i;
165164

166165
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)
10141013
return info->is_ready;
10151014
}
10161015

1017-
static int blkif_open(struct inode *inode, struct file *filep)
1016+
static int blkif_open(struct block_device *bdev, fmode_t mode)
10181017
{
1019-
struct blkfront_info *info = inode->i_bdev->bd_disk->private_data;
1018+
struct blkfront_info *info = bdev->bd_disk->private_data;
10201019
info->users++;
10211020
return 0;
10221021
}
10231022

1024-
static int blkif_release(struct inode *inode, struct file *filep)
1023+
static int blkif_release(struct gendisk *disk, fmode_t mode)
10251024
{
1026-
struct blkfront_info *info = inode->i_bdev->bd_disk->private_data;
1025+
struct blkfront_info *info = disk->private_data;
10271026
info->users--;
10281027
if (info->users == 0) {
10291028
/* Check whether we have been instructed to close. We will
@@ -1041,10 +1040,10 @@ static int blkif_release(struct inode *inode, struct file *filep)
10411040
static struct block_device_operations xlvbd_block_fops =
10421041
{
10431042
.owner = THIS_MODULE,
1044-
.__open = blkif_open,
1045-
.__release = blkif_release,
1043+
.open = blkif_open,
1044+
.release = blkif_release,
10461045
.getgeo = blkif_getgeo,
1047-
.ioctl = blkif_ioctl,
1046+
.locked_ioctl = blkif_ioctl,
10481047
};
10491048

10501049

0 commit comments

Comments
 (0)