aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-09-25 06:51:41 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2020-10-03 00:02:13 -0400
commit89cd35c58bc2e36bfdc23dde67a429b08cf4ae03 (patch)
tree540a413bab63b20e24dba2dece0044277bb778a1 /block
parentiov_iter: refactor rw_copy_check_uvector and import_iovec (diff)
downloadlinux-dev-89cd35c58bc2e36bfdc23dde67a429b08cf4ae03.tar.xz
linux-dev-89cd35c58bc2e36bfdc23dde67a429b08cf4ae03.zip
iov_iter: transparently handle compat iovecs in import_iovec
Use in compat_syscall to import either native or the compat iovecs, and remove the now superflous compat_import_iovec. This removes the need for special compat logic in most callers, and the remaining ones can still be simplified by using __import_iovec with a bool compat parameter. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block')
-rw-r--r--block/scsi_ioctl.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index ef722f04f88a..e08df86866ee 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -333,16 +333,8 @@ static int sg_io(struct request_queue *q, struct gendisk *bd_disk,
struct iov_iter i;
struct iovec *iov = NULL;
-#ifdef CONFIG_COMPAT
- if (in_compat_syscall())
- ret = compat_import_iovec(rq_data_dir(rq),
- hdr->dxferp, hdr->iovec_count,
- 0, &iov, &i);
- else
-#endif
- ret = import_iovec(rq_data_dir(rq),
- hdr->dxferp, hdr->iovec_count,
- 0, &iov, &i);
+ ret = import_iovec(rq_data_dir(rq), hdr->dxferp,
+ hdr->iovec_count, 0, &iov, &i);
if (ret < 0)
goto out_free_cdb;