aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/cciss.c3
-rw-r--r--drivers/block/ub.c2
-rw-r--r--drivers/block/virtio_blk.c4
-rw-r--r--drivers/cdrom/cdrom.c2
-rw-r--r--drivers/ide/ide-floppy_ioctl.c4
-rw-r--r--drivers/scsi/sd.c3
-rw-r--r--drivers/scsi/st.c4
7 files changed, 12 insertions, 10 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
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 4feefa622aed..e286eb5d1f6a 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -2672,7 +2672,7 @@ int cdrom_ioctl(struct file * file, struct cdrom_device_info *cdi,
2672 /* 2672 /*
2673 * Try the generic SCSI command ioctl's first. 2673 * Try the generic SCSI command ioctl's first.
2674 */ 2674 */
2675 ret = scsi_cmd_ioctl(file, disk->queue, disk, cmd, argp); 2675 ret = scsi_cmd_ioctl(disk->queue, disk, file ? file->f_mode : 0, cmd, argp);
2676 if (ret != -ENOTTY) 2676 if (ret != -ENOTTY)
2677 return ret; 2677 return ret;
2678 2678
diff --git a/drivers/ide/ide-floppy_ioctl.c b/drivers/ide/ide-floppy_ioctl.c
index 0d5f5054ab64..3c9da4ac9341 100644
--- a/drivers/ide/ide-floppy_ioctl.c
+++ b/drivers/ide/ide-floppy_ioctl.c
@@ -280,8 +280,8 @@ int ide_floppy_ioctl(ide_drive_t *drive, struct inode *inode,
280 * and CDROM_SEND_PACKET (legacy) ioctls 280 * and CDROM_SEND_PACKET (legacy) ioctls
281 */ 281 */
282 if (cmd != CDROM_SEND_PACKET && cmd != SCSI_IOCTL_SEND_COMMAND) 282 if (cmd != CDROM_SEND_PACKET && cmd != SCSI_IOCTL_SEND_COMMAND)
283 err = scsi_cmd_ioctl(file, bdev->bd_disk->queue, 283 err = scsi_cmd_ioctl(bdev->bd_disk->queue, bdev->bd_disk,
284 bdev->bd_disk, cmd, argp); 284 file ? file->f_mode : 0, cmd, argp);
285 285
286 if (err == -ENOTTY) 286 if (err == -ENOTTY)
287 err = generic_ide_ioctl(drive, file, bdev, cmd, arg); 287 err = generic_ide_ioctl(drive, file, bdev, cmd, arg);
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 202c1ed9abd7..5d74413f591a 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -775,7 +775,8 @@ static int sd_ioctl(struct inode * inode, struct file * filp,
775 case SCSI_IOCTL_GET_BUS_NUMBER: 775 case SCSI_IOCTL_GET_BUS_NUMBER:
776 return scsi_ioctl(sdp, cmd, p); 776 return scsi_ioctl(sdp, cmd, p);
777 default: 777 default:
778 error = scsi_cmd_ioctl(filp, disk->queue, disk, cmd, p); 778 error = scsi_cmd_ioctl(disk->queue, disk,
779 filp ? filp->f_mode : 0, cmd, p);
779 if (error != -ENOTTY) 780 if (error != -ENOTTY)
780 return error; 781 return error;
781 } 782 }
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 5c28d08f18f4..8dffac9f3419 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -3567,8 +3567,8 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
3567 !capable(CAP_SYS_RAWIO)) 3567 !capable(CAP_SYS_RAWIO))
3568 i = -EPERM; 3568 i = -EPERM;
3569 else 3569 else
3570 i = scsi_cmd_ioctl(file, STp->disk->queue, 3570 i = scsi_cmd_ioctl(STp->disk->queue, STp->disk,
3571 STp->disk, cmd_in, p); 3571 file->f_mode, cmd_in, p);
3572 if (i != -ENOTTY) 3572 if (i != -ENOTTY)
3573 return i; 3573 return i;
3574 break; 3574 break;