diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-09-02 15:28:45 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:47:06 -0400 |
commit | aeb5d727062a0238a2f96c9c380fbd2be4640c6f (patch) | |
tree | 51dae8a071fcf42e4431a66d37c5b843c8e99cf6 /block/scsi_ioctl.c | |
parent | 2515ddc6db8eb49a79f0fe5e67ff09ac7c81eab4 (diff) |
[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.c | 5 |
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, | |||
384 | struct gendisk *disk, struct scsi_ioctl_command __user *sic) | 384 | struct gendisk *disk, struct scsi_ioctl_command __user *sic) |
385 | { | 385 | { |
386 | struct request *rq; | 386 | struct request *rq; |
387 | int err, write_perm = 0; | 387 | int err; |
388 | fmode_t write_perm = 0; | ||
388 | unsigned int in_len, out_len, bytes, opcode, cmdlen; | 389 | unsigned int in_len, out_len, bytes, opcode, cmdlen; |
389 | char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE]; | 390 | char *buffer = NULL, sense[SCSI_SENSE_BUFFERSIZE]; |
390 | 391 | ||
@@ -428,7 +429,7 @@ int sg_scsi_ioctl(struct file *file, struct request_queue *q, | |||
428 | 429 | ||
429 | /* scsi_ioctl passes NULL */ | 430 | /* scsi_ioctl passes NULL */ |
430 | if (file && (file->f_mode & FMODE_WRITE)) | 431 | if (file && (file->f_mode & FMODE_WRITE)) |
431 | write_perm = 1; | 432 | write_perm = FMODE_WRITE; |
432 | 433 | ||
433 | err = blk_verify_command(&q->cmd_filter, rq->cmd, write_perm); | 434 | err = blk_verify_command(&q->cmd_filter, rq->cmd, write_perm); |
434 | if (err) | 435 | if (err) |