diff options
author | Al Viro | 2022-06-09 10:28:36 -0400 |
---|---|---|
committer | Al Viro | 2022-08-08 22:37:22 -0400 |
commit | 1ef255e257173f4bc44317ef2076e7e0de688fdf (patch) | |
tree | 700be64ef5aa70a34f6d8158936214e9694e4245 /net/tls | |
parent | 3cf42da327f26eb4461864dd64812345b37f4fd9 (diff) |
iov_iter: advancing variants of iov_iter_get_pages{,_alloc}()
Most of the users immediately follow successful iov_iter_get_pages()
with advancing by the amount it had returned.
Provide inline wrappers doing that, convert trivial open-coded
uses of those.
BTW, iov_iter_get_pages() never returns more than it had been asked
to; such checks in cifs ought to be removed someday...
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/tls')
-rw-r--r-- | net/tls/tls_sw.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 17db8c8811fa..f76119f62f1b 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -1352,7 +1352,7 @@ static int tls_setup_from_iter(struct iov_iter *from, rc = -EFAULT; goto out; } - copied = iov_iter_get_pages(from, pages, + copied = iov_iter_get_pages2(from, pages, length, maxpages, &offset); if (copied <= 0) { @@ -1360,8 +1360,6 @@ static int tls_setup_from_iter(struct iov_iter *from, goto out; } - iov_iter_advance(from, copied); - length -= copied; size += copied; while (copied) { |