diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-20 09:21:14 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-24 05:16:43 -0500 |
commit | c310e72c89926e06138e4881f21e4c8da3e7ef18 (patch) | |
tree | cf40fae1e3639f0ff3607561c1e4fd484b7b53e9 /net/rds/recv.c | |
parent | 7424ce65065852bdf7a040bf2490da4a8fc4b464 (diff) | |
download | linux-c310e72c89926e06138e4881f21e4c8da3e7ef18.tar.gz linux-c310e72c89926e06138e4881f21e4c8da3e7ef18.tar.bz2 linux-c310e72c89926e06138e4881f21e4c8da3e7ef18.zip |
rds: switch ->inc_copy_to_user() to passing iov_iter
instances get considerably simpler from that...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/rds/recv.c')
-rw-r--r-- | net/rds/recv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/rds/recv.c b/net/rds/recv.c index bd82522534fc..47d7b1029b33 100644 --- a/net/rds/recv.c +++ b/net/rds/recv.c @@ -404,6 +404,7 @@ int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, int ret = 0, nonblock = msg_flags & MSG_DONTWAIT; DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name); struct rds_incoming *inc = NULL; + struct iov_iter to; /* udp_recvmsg()->sock_recvtimeo() gets away without locking too.. */ timeo = sock_rcvtimeo(sk, nonblock); @@ -449,8 +450,8 @@ int rds_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, rdsdebug("copying inc %p from %pI4:%u to user\n", inc, &inc->i_conn->c_faddr, ntohs(inc->i_hdr.h_sport)); - ret = inc->i_conn->c_trans->inc_copy_to_user(inc, msg->msg_iov, - size); + iov_iter_init(&to, READ, msg->msg_iov, msg->msg_iovlen, size); + ret = inc->i_conn->c_trans->inc_copy_to_user(inc, &to); if (ret < 0) break; |