switch tcp_sock->ucopy from iovec (ucopy.iov) to msghdr (ucopy.msg)
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 24 Nov 2014 18:26:06 +0000 (13:26 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 9 Dec 2014 21:28:22 +0000 (16:28 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
include/linux/tcp.h
net/ipv4/tcp.c
net/ipv4/tcp_input.c

index f566b8567892ef0bb213de0540b37cfc6ac03ca0..5d9cc9cd2855e3b0aaebbb880a79f7ce16c604df 100644 (file)
@@ -162,7 +162,7 @@ struct tcp_sock {
        struct {
                struct sk_buff_head     prequeue;
                struct task_struct      *task;
-               struct iovec            *iov;
+               struct msghdr           *msg;
                int                     memory;
                int                     len;
        } ucopy;
index dc13a3657e8e1b81ba0cb1fcd5386a9d0b106168..4a96f3730170ade53ba27c1a75a273b6c4878f20 100644 (file)
@@ -1729,7 +1729,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
                        if (!user_recv && !(flags & (MSG_TRUNC | MSG_PEEK))) {
                                user_recv = current;
                                tp->ucopy.task = user_recv;
-                               tp->ucopy.iov = msg->msg_iov;
+                               tp->ucopy.msg = msg;
                        }
 
                        tp->ucopy.len = len;
index 69de1a1c05c9fc575b171f85711a1e3c5aede8c0..075ab4d5af5e46e7a5a177a324228df592cbe5e3 100644 (file)
@@ -4421,7 +4421,7 @@ static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
                        __set_current_state(TASK_RUNNING);
 
                        local_bh_enable();
-                       if (!skb_copy_datagram_iovec(skb, 0, tp->ucopy.iov, chunk)) {
+                       if (!skb_copy_datagram_msg(skb, 0, tp->ucopy.msg, chunk)) {
                                tp->ucopy.len -= chunk;
                                tp->copied_seq += chunk;
                                eaten = (chunk == skb->len);
@@ -4941,10 +4941,9 @@ static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen)
 
        local_bh_enable();
        if (skb_csum_unnecessary(skb))
-               err = skb_copy_datagram_iovec(skb, hlen, tp->ucopy.iov, chunk);
+               err = skb_copy_datagram_msg(skb, hlen, tp->ucopy.msg, chunk);
        else
-               err = skb_copy_and_csum_datagram_iovec(skb, hlen,
-                                                      tp->ucopy.iov);
+               err = skb_copy_and_csum_datagram_msg(skb, hlen, tp->ucopy.msg);
 
        if (!err) {
                tp->ucopy.len -= chunk;