diff options
author | Christoph Hellwig <hch@lst.de> | 2021-07-24 09:20:27 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-07-29 04:24:27 +0200 |
commit | f2542a3be3277a65c766fa6e86b930d3d839f79e (patch) | |
tree | bfb6d2a08fd8f784e0e70d5b87c82e151ea9aecd /include/scsi/scsi_ioctl.h | |
parent | scsi: scsi_ioctl: Simplify SCSI passthrough permission checking (diff) | |
download | linux-f2542a3be3277a65c766fa6e86b930d3d839f79e.tar.xz linux-f2542a3be3277a65c766fa6e86b930d3d839f79e.zip |
scsi: scsi_ioctl: Move the "block layer" SCSI ioctl handling to drivers/scsi
Merge the ioctl handling in block/scsi_ioctl.c into its only caller in
drivers/scsi/scsi_ioctl.c.
Link: https://lore.kernel.org/r/20210724072033.1284840-19-hch@lst.de
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r-- | include/scsi/scsi_ioctl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/scsi/scsi_ioctl.h b/include/scsi/scsi_ioctl.h index defbe8084eb8..b3918fded464 100644 --- a/include/scsi/scsi_ioctl.h +++ b/include/scsi/scsi_ioctl.h @@ -20,6 +20,7 @@ struct gendisk; struct scsi_device; +struct sg_io_hdr; /* * Structures used for scsi_ioctl et al. @@ -46,6 +47,11 @@ int scsi_ioctl_block_when_processing_errors(struct scsi_device *sdev, int cmd, bool ndelay); int scsi_ioctl(struct scsi_device *sdev, struct gendisk *disk, fmode_t mode, int cmd, void __user *arg); +int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, + struct scsi_ioctl_command __user *argp); +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); #endif /* __KERNEL__ */ #endif /* _SCSI_IOCTL_H */ |