diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-05-02 17:35:03 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-06-10 17:45:20 +0200 |
commit | 7baa5099002f2f2ea6c026890598ed1708e7cfd4 (patch) | |
tree | 08e564057e2015629de372c3fdf2c30aca62aa8c /net | |
parent | iov_iter: make the amount already copied available to iterator callbacks (diff) | |
download | linux-7baa5099002f2f2ea6c026890598ed1708e7cfd4.tar.xz linux-7baa5099002f2f2ea6c026890598ed1708e7cfd4.zip |
iov_iter: make iterator callbacks use base and len instead of iovec
Iterator macros used to provide the arguments for step callbacks in
a structure matching the flavour - iovec for ITER_IOVEC, kvec for
ITER_KVEC and bio_vec for ITER_BVEC. That already broke down for
ITER_XARRAY (bio_vec there); now that we are using kvec callback
for bvec and xarray cases, we are always passing a pointer + length
(void __user * + size_t for ITER_IOVEC callback, void * + size_t
for everything else).
Note that the original reason for bio_vec (page + offset + len) in
case of ITER_BVEC used to be that we did *not* want to kmap a
page when all we wanted was e.g. to find the alignment of its
subrange. Now all such users are gone and the ones that are left
want the page mapped anyway for actually copying the data.
So in all cases we have pointer + length, and there's no good
reason for keeping those in struct iovec or struct kvec - we
can just pass them to callback separately.
Again, less boilerplate in callbacks...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions