diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-04-30 17:26:41 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-06-10 18:45:14 +0300 |
commit | f0b65f39ac505e8f1dcdaa165aa7b8c0bd6fd454 (patch) | |
tree | 05ad20f84ee097a534132fa9b2df9feae6d4a7d2 /include | |
parent | e4f8df86798aea60aff6cfff40252b709431f850 (diff) | |
download | linux-f0b65f39ac505e8f1dcdaa165aa7b8c0bd6fd454.tar.xz |
iov_iter: replace iov_iter_copy_from_user_atomic() with iterator-advancing variant
Replacement is called copy_page_from_iter_atomic(); unlike the old primitive the
callers do *not* need to do iov_iter_advance() after it. In case when they end
up consuming less than they'd been given they need to do iov_iter_revert() on
everything they had not consumed. That, however, needs to be done only on slow
paths.
All in-tree callers converted. And that kills the last user of iterate_all_kinds()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/uio.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h index b5cf54859109..82c3c3e819e0 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -115,8 +115,8 @@ static inline struct iovec iov_iter_iovec(const struct iov_iter *iter) }; } -size_t iov_iter_copy_from_user_atomic(struct page *page, - struct iov_iter *i, unsigned long offset, size_t bytes); +size_t copy_page_from_iter_atomic(struct page *page, unsigned offset, + size_t bytes, struct iov_iter *i); void iov_iter_advance(struct iov_iter *i, size_t bytes); void iov_iter_revert(struct iov_iter *i, size_t bytes); int iov_iter_fault_in_readable(const struct iov_iter *i, size_t bytes); |