summaryrefslogtreecommitdiff
path: root/net/rds
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-04-12 23:09:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2017-04-21 13:57:11 -0400
commitdc88e3b4c8c9c473c5e0bc65bcf0d3666ee1e022 (patch)
tree09e9ac308e01ad1c56360937b5ba2d0431967de0 /net/rds
parent85128b2be6738fe36c224995c5ee80fe80fbb1b5 (diff)
rds: make use of iov_iter_revert()
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/recv.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/rds/recv.c b/net/rds/recv.c
index 8b7e7b7f2c2d..c70c32cb05f5 100644
--- a/net/rds/recv.c
+++ b/net/rds/recv.c
@@ -594,7 +594,6 @@ int rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
goto out;
while (1) {
- struct iov_iter save;
/* If there are pending notifications, do those - and nothing else */
if (!list_empty(&rs->rs_notify_queue)) {
ret = rds_notify_queue_get(rs, msg);
@@ -630,7 +629,6 @@ int rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
rdsdebug("copying inc %p from %pI4:%u to user\n", inc,
&inc->i_conn->c_faddr,
ntohs(inc->i_hdr.h_sport));
- save = msg->msg_iter;
ret = inc->i_conn->c_trans->inc_copy_to_user(inc, &msg->msg_iter);
if (ret < 0)
break;
@@ -644,7 +642,7 @@ int rds_recvmsg(struct socket *sock, struct msghdr *msg, size_t size,
rds_inc_put(inc);
inc = NULL;
rds_stats_inc(s_recv_deliver_raced);
- msg->msg_iter = save;
+ iov_iter_revert(&msg->msg_iter, ret);
continue;
}