summaryrefslogtreecommitdiffstats
path: root/block/scsi_ioctl.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-09-02 21:28:45 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 13:47:06 +0200
commitaeb5d727062a0238a2f96c9c380fbd2be4640c6f (patch)
tree51dae8a071fcf42e4431a66d37c5b843c8e99cf6 /block/scsi_ioctl.c
parentbinfmt_elf_fdpic: Update for cputime changes. (diff)
downloadlinux-aeb5d727062a0238a2f96c9c380fbd2be4640c6f.tar.xz
linux-aeb5d727062a0238a2f96c9c380fbd2be4640c6f.zip
[PATCH] introduce fmode_t, do annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block/scsi_ioctl.c')
-rw-r--r--block/scsi_ioctl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index c34272a348fe..c525905f9d35 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -384,7 +384,8 @@ int sg_scsi_ioctl(struct file *file, struct request_queue *q,
struct gendisk *disk, struct scsi_ioctl_command __user *sic)
{
struct request *rq;
- int err, write_perm = 0;
+ int err;
+ fmode_t write_perm = 0;
unsigned int in_len, out_len, bytes, opcode, cmdlen;
char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE];
@@ -428,7 +429,7 @@ int sg_scsi_ioctl(struct file *file, struct request_queue *q,
/* scsi_ioctl passes NULL */
if (file && (file->f_mode & FMODE_WRITE))
- write_perm = 1;
+ write_perm = FMODE_WRITE;
err = blk_verify_command(&q->cmd_filter, rq->cmd, write_perm);
if (err)