mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
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.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
b2123d3b09
commit
08dc2f9b53
@ -530,8 +530,8 @@ out_put_request:
|
||||
* Positive numbers returned are the compacted SCSI error codes (4
|
||||
* 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,
|
||||
struct scsi_ioctl_command __user *sic)
|
||||
static int sg_scsi_ioctl(struct request_queue *q, struct gendisk *disk,
|
||||
fmode_t mode, struct scsi_ioctl_command __user *sic)
|
||||
{
|
||||
enum { OMAX_SB_LEN = 16 }; /* For backward compatibility */
|
||||
struct request *rq;
|
||||
@ -643,7 +643,6 @@ error_free_buffer:
|
||||
|
||||
return err;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(sg_scsi_ioctl);
|
||||
|
||||
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,
|
||||
case SCSI_IOCTL_SEND_COMMAND:
|
||||
if (atomic_read(&sdp->detaching))
|
||||
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:
|
||||
result = get_user(val, ip);
|
||||
if (result)
|
||||
|
@ -47,8 +47,6 @@ 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);
|
||||
|
Loading…
Reference in New Issue
Block a user