From 083735f4b01b703184c0e11c2e384b2c60a8aea4 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 20 Nov 2014 09:31:08 -0500 Subject: rds: switch rds_message_copy_from_user() to iov_iter Signed-off-by: Al Viro --- net/rds/send.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'net/rds/send.c') 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; } -- cgit v1.2.3-58-ga151