projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
747b1f6
)
iov_iter: convert import_single_range() to ITER_UBUF
author
Jens Axboe
<axboe@kernel.dk>
Fri, 24 Mar 2023 20:35:49 +0000
(14:35 -0600)
committer
Jens Axboe
<axboe@kernel.dk>
Thu, 30 Mar 2023 14:12:29 +0000
(08:12 -0600)
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>
lib/iov_iter.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/iov_iter.c
b/lib/iov_iter.c
index 87488c4aad3f3d33d4b8ac17990105f1e820d1f8..f411bda1171f1dbecd80b57afce98b72cb792170 100644
(file)
--- a/
lib/iov_iter.c
+++ b/
lib/iov_iter.c
@@
-1870,9
+1870,7
@@
int import_single_range(int rw, void __user *buf, size_t len,
if (unlikely(!access_ok(buf, len)))
return -EFAULT;
- iov->iov_base = buf;
- iov->iov_len = len;
- iov_iter_init(i, rw, iov, 1, len);
+ iov_iter_ubuf(i, rw, buf, len);
return 0;
}
EXPORT_SYMBOL(import_single_range);