summaryrefslogtreecommitdiffstats
path: root/drivers/block/nvme-core.c
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2014-08-27 13:55:38 -0600
committerJens Axboe <axboe@fb.com>2014-11-04 13:17:09 -0700
commite179729a821c1b82375f5593533c027462e753b7 (patch)
treeee79dce67ac9ad3c500c7197266d671648cad53e /drivers/block/nvme-core.c
parenta96d4f5c2da66a0c1537bfd8aaa868b69595476a (diff)
downloadtalos-obmc-linux-e179729a821c1b82375f5593533c027462e753b7.tar.gz
talos-obmc-linux-e179729a821c1b82375f5593533c027462e753b7.zip
NVMe: Remove duplicate compat SG_IO code
We can return -ENOIOCTLCMD and the ioctl will be handled by fs/compat_ioctl.c instead. This removes a lot of duplicate code in the nvme driver. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/nvme-core.c')
-rw-r--r--drivers/block/nvme-core.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 955b5699ff96..37f22b6bb009 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -1807,11 +1807,9 @@ static int nvme_ioctl(struct block_device *bdev, fmode_t mode, unsigned int cmd,
static int nvme_compat_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
- struct nvme_ns *ns = bdev->bd_disk->private_data;
-
switch (cmd) {
case SG_IO:
- return nvme_sg_io32(ns, arg);
+ return -ENOIOCTLCMD;
}
return nvme_ioctl(bdev, mode, cmd, arg);
}
OpenPOWER on IntegriCloud