diff options
author | Christoph Hellwig <hch@lst.de> | 2023-06-08 13:02:47 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-06-12 08:04:04 -0600 |
commit | 2e80089c18241699c41d0af0669cb93844ff0dc1 (patch) | |
tree | 32c3ef61db8fed5d054e6481ebb63513be156b72 /drivers/scsi/sr.c | |
parent | 5f4eb9d5413fdfc779c099fdaf0ff417eb163145 (diff) | |
download | linux-2e80089c18241699c41d0af0669cb93844ff0dc1.tar.gz linux-2e80089c18241699c41d0af0669cb93844ff0dc1.tar.bz2 linux-2e80089c18241699c41d0af0669cb93844ff0dc1.zip |
scsi: replace the fmode_t argument to scsi_ioctl 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-20-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/scsi/sr.c')
-rw-r--r-- | drivers/scsi/sr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 55082acb59bc..00aaafc8dd78 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -543,7 +543,7 @@ static int sr_block_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, if (ret != -ENOSYS) goto put; } - ret = scsi_ioctl(sdev, mode, cmd, argp); + ret = scsi_ioctl(sdev, mode & FMODE_WRITE, cmd, argp); put: scsi_autopm_put_device(sdev); |