Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit e03ad4e

Browse files
committed
iov_iter: convert import_single_range() to ITER_UBUF
Since we're just importing a single vector, we don't have to turn it into an ITER_IOVEC. Instead turn it into an ITER_UBUF, which is cheaper to iterate. Signed-off-by: Jens Axboe <[email protected]>
1 parent 747b1f6 commit e03ad4e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/iov_iter.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,9 +1870,7 @@ int import_single_range(int rw, void __user *buf, size_t len,
18701870
if (unlikely(!access_ok(buf, len)))
18711871
return -EFAULT;
18721872

1873-
iov->iov_base = buf;
1874-
iov->iov_len = len;
1875-
iov_iter_init(i, rw, iov, 1, len);
1873+
iov_iter_ubuf(i, rw, buf, len);
18761874
return 0;
18771875
}
18781876
EXPORT_SYMBOL(import_single_range);

0 commit comments

Comments
 (0)