diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-08-27 15:38:10 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:47:14 -0400 |
commit | 74f3c8aff36ad6552ea609c8b20bfd588fa16f38 (patch) | |
tree | c046823751971ff37b66499282ca2b2e263cc71a /block | |
parent | e915e872ed921d707bc32b3f2184d43abfa8c9e2 (diff) | |
download | op-kernel-dev-74f3c8aff36ad6552ea609c8b20bfd588fa16f38.zip op-kernel-dev-74f3c8aff36ad6552ea609c8b20bfd588fa16f38.tar.gz |
[PATCH] switch scsi_cmd_ioctl() to passing fmode_t
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block')
-rw-r--r-- | block/bsg.c | 2 | ||||
-rw-r--r-- | block/scsi_ioctl.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/block/bsg.c b/block/bsg.c index 2d36b12..e8bd247 100644 --- a/block/bsg.c +++ b/block/bsg.c @@ -914,7 +914,7 @@ static long bsg_ioctl(struct file *file, unsigned int cmd, unsigned long arg) case SG_EMULATED_HOST: case SCSI_IOCTL_SEND_COMMAND: { void __user *uarg = (void __user *) arg; - return scsi_cmd_ioctl(file, bd->queue, NULL, cmd, uarg); + return scsi_cmd_ioctl(bd->queue, NULL, file->f_mode, cmd, uarg); } case SG_IO: { struct request *rq; diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c index 375e25d..5963cf9 100644 --- a/block/scsi_ioctl.c +++ b/block/scsi_ioctl.c @@ -517,8 +517,8 @@ static inline int blk_send_start_stop(struct request_queue *q, return __blk_send_generic(q, bd_disk, GPCMD_START_STOP_UNIT, data); } -int scsi_cmd_ioctl(struct file *file, struct request_queue *q, - struct gendisk *bd_disk, unsigned int cmd, void __user *arg) +int scsi_cmd_ioctl(struct request_queue *q, struct gendisk *bd_disk, fmode_t mode, + unsigned int cmd, void __user *arg) { int err; @@ -559,7 +559,7 @@ int scsi_cmd_ioctl(struct file *file, struct request_queue *q, err = -EFAULT; if (copy_from_user(&hdr, arg, sizeof(hdr))) break; - err = sg_io(q, bd_disk, &hdr, file ? file->f_mode : 0); + err = sg_io(q, bd_disk, &hdr, mode); if (err == -EFAULT) break; @@ -607,7 +607,7 @@ int scsi_cmd_ioctl(struct file *file, struct request_queue *q, hdr.cmdp = ((struct cdrom_generic_command __user*) arg)->cmd; hdr.cmd_len = sizeof(cgc.cmd); - err = sg_io(q, bd_disk, &hdr, file ? file->f_mode : 0); + err = sg_io(q, bd_disk, &hdr, mode); if (err == -EFAULT) break; @@ -631,7 +631,7 @@ int scsi_cmd_ioctl(struct file *file, struct request_queue *q, if (!arg) break; - err = sg_scsi_ioctl(q, bd_disk, file ? file->f_mode : 0, arg); + err = sg_scsi_ioctl(q, bd_disk, mode, arg); break; case CDROMCLOSETRAY: err = blk_send_start_stop(q, bd_disk, 0x03); |