aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/cciss.c3
-rw-r--r--drivers/block/ub.c2
-rw-r--r--drivers/block/virtio_blk.c4
3 files changed, 5 insertions, 4 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 1e1f9153000c..d9b1c15b8113 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -1232,7 +1232,8 @@ static int cciss_ioctl(struct inode *inode, struct file *filep,
1232 case SG_EMULATED_HOST: 1232 case SG_EMULATED_HOST:
1233 case SG_IO: 1233 case SG_IO:
1234 case SCSI_IOCTL_SEND_COMMAND: 1234 case SCSI_IOCTL_SEND_COMMAND:
1235 return scsi_cmd_ioctl(filep, disk->queue, disk, cmd, argp); 1235 return scsi_cmd_ioctl(disk->queue, disk,
1236 filep ? filep->f_mode : 0, cmd, argp);
1236 1237
1237 /* scsi_cmd_ioctl would normally handle these, below, but */ 1238 /* scsi_cmd_ioctl would normally handle these, below, but */
1238 /* they aren't a good fit for cciss, as CD-ROMs are */ 1239 /* they aren't a good fit for cciss, as CD-ROMs are */
diff --git a/drivers/block/ub.c b/drivers/block/ub.c
index 85d41eb67c0b..bc04330f3683 100644
--- a/drivers/block/ub.c
+++ b/drivers/block/ub.c
@@ -1729,7 +1729,7 @@ static int ub_bd_ioctl(struct inode *inode, struct file *filp,
1729 struct gendisk *disk = inode->i_bdev->bd_disk; 1729 struct gendisk *disk = inode->i_bdev->bd_disk;
1730 void __user *usermem = (void __user *) arg; 1730 void __user *usermem = (void __user *) arg;
1731 1731
1732 return scsi_cmd_ioctl(filp, disk->queue, disk, cmd, usermem); 1732 return scsi_cmd_ioctl(disk->queue, disk, filp ? filp->f_mode : 0, cmd, usermem);
1733} 1733}
1734 1734
1735/* 1735/*
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 6ec5fc052786..7643cd16fd67 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -149,8 +149,8 @@ static void do_virtblk_request(struct request_queue *q)
149static int virtblk_ioctl(struct inode *inode, struct file *filp, 149static int virtblk_ioctl(struct inode *inode, struct file *filp,
150 unsigned cmd, unsigned long data) 150 unsigned cmd, unsigned long data)
151{ 151{
152 return scsi_cmd_ioctl(filp, inode->i_bdev->bd_disk->queue, 152 return scsi_cmd_ioctl(inode->i_bdev->bd_disk->queue,
153 inode->i_bdev->bd_disk, cmd, 153 inode->i_bdev->bd_disk, filp->f_mode, cmd,
154 (void __user *)data); 154 (void __user *)data);
155} 155}
156 156