Commit 08dc2f9b authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

scsi: scsi_ioctl: Unexport sg_scsi_ioctl()

Just call scsi_ioctl() in sg as that has the same effect.

Link: https://lore.kernel.org/r/20210724072033.1284840-25-hch@lst.deSigned-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b2123d3b
...@@ -530,8 +530,8 @@ static int sg_io(struct request_queue *q, struct gendisk *bd_disk, ...@@ -530,8 +530,8 @@ static int sg_io(struct request_queue *q, struct gendisk *bd_disk,
* Positive numbers returned are the compacted SCSI error codes (4 * Positive numbers returned are the compacted SCSI error codes (4
* bytes in one int) where the lowest byte is the SCSI status. * bytes in one int) where the lowest byte is the SCSI status.
*/ */
int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, static int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk,
struct scsi_ioctl_command __user *sic) fmode_t mode, struct scsi_ioctl_command __user *sic)
{ {
enum { OMAX_SB_LEN = 16 }; /* For backward compatibility */ enum { OMAX_SB_LEN = 16 }; /* For backward compatibility */
struct request *rq; struct request *rq;
...@@ -643,7 +643,6 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode, ...@@ -643,7 +643,6 @@ int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk, fmode_t mode,
return err; return err;
} }
EXPORT_SYMBOL_GPL(sg_scsi_ioctl);
int put_sg_io_hdr(const struct sg_io_hdr *hdr, void __user *argp) int put_sg_io_hdr(const struct sg_io_hdr *hdr, void __user *argp)
{ {
......
...@@ -1109,7 +1109,7 @@ sg_ioctl_common(struct file *filp, Sg_device *sdp, Sg_fd *sfp, ...@@ -1109,7 +1109,7 @@ sg_ioctl_common(struct file *filp, Sg_device *sdp, Sg_fd *sfp,
case SCSI_IOCTL_SEND_COMMAND: case SCSI_IOCTL_SEND_COMMAND:
if (atomic_read(&sdp->detaching)) if (atomic_read(&sdp->detaching))
return -ENODEV; return -ENODEV;
return sg_scsi_ioctl(sdp->device->request_queue, NULL, filp->f_mode, p); return scsi_ioctl(sdp->device, NULL, filp->f_mode, cmd_in, p);
case SG_SET_DEBUG: case SG_SET_DEBUG:
result = get_user(val, ip); result = get_user(val, ip);
if (result) if (result)
......
...@@ -47,8 +47,6 @@ int scsi_ioctl_block_when_processing_errors(struct scsi_device *sdev, ...@@ -47,8 +47,6 @@ int scsi_ioctl_block_when_processing_errors(struct scsi_device *sdev,
int cmd, bool ndelay); int cmd, bool ndelay);
int scsi_ioctl(struct scsi_device *sdev, struct gendisk *disk, fmode_t mode, int scsi_ioctl(struct scsi_device *sdev, struct gendisk *disk, fmode_t mode,
int cmd, void __user *arg); 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 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); 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, fmode_t mode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment