aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-11-24 13:26:06 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2014-12-09 16:28:22 -0500
commitf4362a2c9524678f0459cf410403f8595e5cfce5 (patch)
tree6b112cb41a3c4c6b444f7c8aac77ad96e48e91b2
parentf69e6d131f5dac8278ac79a902cc448364880d8b (diff)
switch tcp_sock->ucopy from iovec (ucopy.iov) to msghdr (ucopy.msg)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--include/linux/tcp.h2
-rw-r--r--net/ipv4/tcp.c2
-rw-r--r--net/ipv4/tcp_input.c7
3 files changed, 5 insertions, 6 deletions
diff --git a/include/linux/tcp.h b/include/linux/tcp.h
index f566b8567892..5d9cc9cd2855 100644
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -162,7 +162,7 @@ struct tcp_sock {
162 struct { 162 struct {
163 struct sk_buff_head prequeue; 163 struct sk_buff_head prequeue;
164 struct task_struct *task; 164 struct task_struct *task;
165 struct iovec *iov; 165 struct msghdr *msg;
166 int memory; 166 int memory;
167 int len; 167 int len;
168 } ucopy; 168 } ucopy;
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index dc13a3657e8e..4a96f3730170 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1729,7 +1729,7 @@ int tcp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
1729 if (!user_recv && !(flags & (MSG_TRUNC | MSG_PEEK))) { 1729 if (!user_recv && !(flags & (MSG_TRUNC | MSG_PEEK))) {
1730 user_recv = current; 1730 user_recv = current;
1731 tp->ucopy.task = user_recv; 1731 tp->ucopy.task = user_recv;
1732 tp->ucopy.iov = msg->msg_iov; 1732 tp->ucopy.msg = msg;
1733 } 1733 }
1734 1734
1735 tp->ucopy.len = len; 1735 tp->ucopy.len = len;
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 69de1a1c05c9..075ab4d5af5e 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4421,7 +4421,7 @@ static void tcp_data_queue(struct sock *sk, struct sk_buff *skb)
4421 __set_current_state(TASK_RUNNING); 4421 __set_current_state(TASK_RUNNING);
4422 4422
4423 local_bh_enable(); 4423 local_bh_enable();
4424 if (!skb_copy_datagram_iovec(skb, 0, tp->ucopy.iov, chunk)) { 4424 if (!skb_copy_datagram_msg(skb, 0, tp->ucopy.msg, chunk)) {
4425 tp->ucopy.len -= chunk; 4425 tp->ucopy.len -= chunk;
4426 tp->copied_seq += chunk; 4426 tp->copied_seq += chunk;
4427 eaten = (chunk == skb->len); 4427 eaten = (chunk == skb->len);
@@ -4941,10 +4941,9 @@ static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen)
4941 4941
4942 local_bh_enable(); 4942 local_bh_enable();
4943 if (skb_csum_unnecessary(skb)) 4943 if (skb_csum_unnecessary(skb))
4944 err = skb_copy_datagram_iovec(skb, hlen, tp->ucopy.iov, chunk); 4944 err = skb_copy_datagram_msg(skb, hlen, tp->ucopy.msg, chunk);
4945 else 4945 else
4946 err = skb_copy_and_csum_datagram_iovec(skb, hlen, 4946 err = skb_copy_and_csum_datagram_msg(skb, hlen, tp->ucopy.msg);
4947 tp->ucopy.iov);
4948 4947
4949 if (!err) { 4948 if (!err) {
4950 tp->ucopy.len -= chunk; 4949 tp->ucopy.len -= chunk;