diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-20 17:31:08 +0300 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-24 13:16:43 +0300 |
commit | 083735f4b01b703184c0e11c2e384b2c60a8aea4 (patch) | |
tree | ac816d0abd837948fb6e6c54cdf680e5def4923c /net/rds/send.c | |
parent | c310e72c89926e06138e4881f21e4c8da3e7ef18 (diff) | |
download | linux-083735f4b01b703184c0e11c2e384b2c60a8aea4.tar.xz |
rds: switch rds_message_copy_from_user() to iov_iter
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/rds/send.c')
-rw-r--r-- | net/rds/send.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/rds/send.c b/net/rds/send.c index 0a64541020b0..4de62ead1c71 100644 --- a/net/rds/send.c +++ b/net/rds/send.c @@ -934,7 +934,9 @@ int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, int queued = 0, allocated_mr = 0; int nonblock = msg->msg_flags & MSG_DONTWAIT; long timeo = sock_sndtimeo(sk, nonblock); + struct iov_iter from; + iov_iter_init(&from, WRITE, msg->msg_iov, msg->msg_iovlen, payload_len); /* Mirror Linux UDP mirror of BSD error message compatibility */ /* XXX: Perhaps MSG_MORE someday */ if (msg->msg_flags & ~(MSG_DONTWAIT | MSG_CMSG_COMPAT)) { @@ -982,7 +984,7 @@ int rds_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, ret = -ENOMEM; goto out; } - ret = rds_message_copy_from_user(rm, msg->msg_iov, payload_len); + ret = rds_message_copy_from_user(rm, &from); if (ret) goto out; } |