summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sd.c3
-rw-r--r--drivers/scsi/st.c4
2 files changed, 4 insertions, 3 deletions
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,
case SCSI_IOCTL_GET_BUS_NUMBER:
return scsi_ioctl(sdp, cmd, p);
default:
- error = scsi_cmd_ioctl(filp, disk->queue, disk, cmd, p);
+ error = scsi_cmd_ioctl(disk->queue, disk,
+ filp ? filp->f_mode : 0, cmd, p);
if (error != -ENOTTY)
return error;
}
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)
!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;