diff options
author | Christoph Hellwig <hch@lst.de> | 2023-06-08 13:02:46 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-06-12 16:04:04 +0200 |
commit | 5f4eb9d5413fdfc779c099fdaf0ff417eb163145 (patch) | |
tree | ff4f42e7121b8ab7e62c4cf99bc25923312842e1 /include/scsi | |
parent | fs: remove sb->s_mode (diff) | |
download | linux-5f4eb9d5413fdfc779c099fdaf0ff417eb163145.tar.xz linux-5f4eb9d5413fdfc779c099fdaf0ff417eb163145.zip |
scsi: replace the fmode_t argument to scsi_cmd_allowed with a simple bool
Instead of passing a fmode_t and only checking it for FMODE_WRITE, pass
a bool open_for_write to prepare for callers that won't have the fmode_t.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20230608110258.189493-19-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi_ioctl.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/scsi/scsi_ioctl.h b/include/scsi/scsi_ioctl.h index beac64e38b87..914201a8cb94 100644 --- a/include/scsi/scsi_ioctl.h +++ b/include/scsi/scsi_ioctl.h @@ -49,7 +49,7 @@ int scsi_ioctl(struct scsi_device *sdev, fmode_t mode, int cmd, void __user *arg); int get_sg_io_hdr(struct sg_io_hdr *hdr, const void __user *argp); int put_sg_io_hdr(const struct sg_io_hdr *hdr, void __user *argp); -bool scsi_cmd_allowed(unsigned char *cmd, fmode_t mode); +bool scsi_cmd_allowed(unsigned char *cmd, bool open_for_write); #endif /* __KERNEL__ */ #endif /* _SCSI_IOCTL_H */ |