diff options
author | Grant Likely <grant.likely@linaro.org> | 2014-03-31 08:10:55 +0100 |
---|---|---|
committer | Grant Likely <grant.likely@linaro.org> | 2014-03-31 08:10:55 +0100 |
commit | d88cf7d7b4240b8df170ba105e414e476fb51cce (patch) | |
tree | 7efe976da6e0ec854eb0eeda82c1e9a275b8c69f /net/ipv4/tcp.c | |
parent | 676e1b2fcd9dbb47a59baac13d089621d22c68b8 (diff) | |
parent | 6f976267da0e2c873c4b4aaacaf08266d1d1797d (diff) | |
download | linux-d88cf7d7b4240b8df170ba105e414e476fb51cce.tar.gz linux-d88cf7d7b4240b8df170ba105e414e476fb51cce.tar.bz2 linux-d88cf7d7b4240b8df170ba105e414e476fb51cce.zip |
Merge remote-tracking branch 'robh/for-next' into devicetree/next
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 9f3a2db9109e..97c8f5620c43 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -1044,7 +1044,8 @@ void tcp_free_fastopen_req(struct tcp_sock *tp) } } -static int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg, int *size) +static int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg, + int *copied, size_t size) { struct tcp_sock *tp = tcp_sk(sk); int err, flags; @@ -1059,11 +1060,12 @@ static int tcp_sendmsg_fastopen(struct sock *sk, struct msghdr *msg, int *size) if (unlikely(tp->fastopen_req == NULL)) return -ENOBUFS; tp->fastopen_req->data = msg; + tp->fastopen_req->size = size; flags = (msg->msg_flags & MSG_DONTWAIT) ? O_NONBLOCK : 0; err = __inet_stream_connect(sk->sk_socket, msg->msg_name, msg->msg_namelen, flags); - *size = tp->fastopen_req->copied; + *copied = tp->fastopen_req->copied; tcp_free_fastopen_req(tp); return err; } @@ -1083,7 +1085,7 @@ int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, flags = msg->msg_flags; if (flags & MSG_FASTOPEN) { - err = tcp_sendmsg_fastopen(sk, msg, &copied_syn); + err = tcp_sendmsg_fastopen(sk, msg, &copied_syn, size); if (err == -EINPROGRESS && copied_syn > 0) goto out; else if (err) |