mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux
synced 2025-09-20 12:28:53 +10:00
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 <axboe@kernel.dk>
This commit is contained in:
parent
747b1f65d3
commit
e03ad4ee27
@ -1870,9 +1870,7 @@ int import_single_range(int rw, void __user *buf, size_t len,
|
|||||||
if (unlikely(!access_ok(buf, len)))
|
if (unlikely(!access_ok(buf, len)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
iov->iov_base = buf;
|
iov_iter_ubuf(i, rw, buf, len);
|
||||||
iov->iov_len = len;
|
|
||||||
iov_iter_init(i, rw, iov, 1, len);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(import_single_range);
|
EXPORT_SYMBOL(import_single_range);
|
||||||
|
Loading…
Reference in New Issue
Block a user