summaryrefslogtreecommitdiff
path: root/block/scsi_ioctl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-07-24 09:20:19 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2021-07-28 22:24:25 -0400
commit4f07bfc56157ebc689ef54879e90c48a47294083 (patch)
treee9622759f995104badfc5b9d25dbb8ec49b2648f /block/scsi_ioctl.c
parentfb1ba406c451045f1063ace70086b4645d4e9d54 (diff)
scsi: scsi_ioctl: Remove scsi_verify_blk_ioctl()
Manually verify that the device is not a partition and the caller has admin privŃ–leges at the beginning of the sr ioctl method and open code the trivial check for sd as well. Link: https://lore.kernel.org/r/20210724072033.1284840-11-hch@lst.de Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'block/scsi_ioctl.c')
-rw-r--r--block/scsi_ioctl.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index f8138438c56f..ca7b84452d9d 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -842,18 +842,6 @@ int scsi_cmd_ioctl(struct request_queue *q, struct gendisk *bd_disk, fmode_t mod
}
EXPORT_SYMBOL(scsi_cmd_ioctl);
-int scsi_verify_blk_ioctl(struct block_device *bd, unsigned int cmd)
-{
- if (bd && !bdev_is_partition(bd))
- return 0;
-
- if (capable(CAP_SYS_RAWIO))
- return 0;
-
- return -ENOIOCTLCMD;
-}
-EXPORT_SYMBOL(scsi_verify_blk_ioctl);
-
/**
* scsi_req_init - initialize certain fields of a scsi_request structure
* @req: Pointer to a scsi_request structure.