aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_ioctl.c')
-rw-r--r--drivers/scsi/scsi_ioctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_ioctl.c b/drivers/scsi/scsi_ioctl.c
index 28b19ef26309..dc1cfb2fd76b 100644
--- a/drivers/scsi/scsi_ioctl.c
+++ b/drivers/scsi/scsi_ioctl.c
@@ -237,7 +237,7 @@ int scsi_ioctl(struct scsi_device *sdev, int cmd, void __user *arg)
237 case SCSI_IOCTL_SEND_COMMAND: 237 case SCSI_IOCTL_SEND_COMMAND:
238 if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO)) 238 if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
239 return -EACCES; 239 return -EACCES;
240 return sg_scsi_ioctl(NULL, sdev->request_queue, NULL, arg); 240 return sg_scsi_ioctl(sdev->request_queue, NULL, 0, arg);
241 case SCSI_IOCTL_DOORLOCK: 241 case SCSI_IOCTL_DOORLOCK:
242 return scsi_set_medium_removal(sdev, SCSI_REMOVAL_PREVENT); 242 return scsi_set_medium_removal(sdev, SCSI_REMOVAL_PREVENT);
243 case SCSI_IOCTL_DOORUNLOCK: 243 case SCSI_IOCTL_DOORUNLOCK:
@@ -277,14 +277,14 @@ EXPORT_SYMBOL(scsi_ioctl);
277 * @filp: either NULL or a &struct file which must have the O_NONBLOCK flag. 277 * @filp: either NULL or a &struct file which must have the O_NONBLOCK flag.
278 */ 278 */
279int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd, 279int scsi_nonblockable_ioctl(struct scsi_device *sdev, int cmd,
280 void __user *arg, struct file *filp) 280 void __user *arg, int ndelay)
281{ 281{
282 int val, result; 282 int val, result;
283 283
284 /* The first set of iocts may be executed even if we're doing 284 /* The first set of iocts may be executed even if we're doing
285 * error processing, as long as the device was opened 285 * error processing, as long as the device was opened
286 * non-blocking */ 286 * non-blocking */
287 if (filp && (filp->f_flags & O_NONBLOCK)) { 287 if (ndelay) {
288 if (scsi_host_in_recovery(sdev->host)) 288 if (scsi_host_in_recovery(sdev->host))
289 return -ENODEV; 289 return -ENODEV;
290 } else if (!scsi_block_when_processing_errors(sdev)) 290 } else if (!scsi_block_when_processing_errors(sdev))