summaryrefslogtreecommitdiff
path: root/net/rds
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2022-06-09 10:28:36 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2022-08-08 22:37:22 -0400
commit1ef255e257173f4bc44317ef2076e7e0de688fdf (patch)
tree700be64ef5aa70a34f6d8158936214e9694e4245 /net/rds
parent3cf42da327f26eb4461864dd64812345b37f4fd9 (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/rds')
-rw-r--r--net/rds/message.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/rds/message.c b/net/rds/message.c
index 799034e0f513..d74be4e3f3fa 100644
--- a/net/rds/message.c
+++ b/net/rds/message.c
@@ -391,7 +391,7 @@ static int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter *
size_t start;
ssize_t copied;
- copied = iov_iter_get_pages(from, &pages, PAGE_SIZE,
+ copied = iov_iter_get_pages2(from, &pages, PAGE_SIZE,
1, &start);
if (copied < 0) {
struct mmpin *mmp;
@@ -405,7 +405,6 @@ static int rds_message_zcopy_from_user(struct rds_message *rm, struct iov_iter *
goto err;
}
total_copied += copied;
- iov_iter_advance(from, copied);
length -= copied;
sg_set_page(sg, pages, copied, start);
rm->data.op_nents++;