diff options
Diffstat (limited to 'drivers/scsi/st.c')
-rw-r--r-- | drivers/scsi/st.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 5c28d08..c959bdc 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -3263,7 +3263,8 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg) * may try and take the device offline, in which case all further * access to the device is prohibited. */ - retval = scsi_nonblockable_ioctl(STp->device, cmd_in, p, file); + retval = scsi_nonblockable_ioctl(STp->device, cmd_in, p, + file->f_flags & O_NDELAY); if (!scsi_block_when_processing_errors(STp->device) || retval != -ENODEV) goto out; retval = 0; @@ -3567,8 +3568,8 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg) !capable(CAP_SYS_RAWIO)) i = -EPERM; else - i = scsi_cmd_ioctl(file, STp->disk->queue, - STp->disk, cmd_in, p); + i = scsi_cmd_ioctl(STp->disk->queue, STp->disk, + file->f_mode, cmd_in, p); if (i != -ENOTTY) return i; break; |