summaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.com>2018-06-20 12:22:22 -0400
committerGustavo Padovan <gustavo.padovan@collabora.com>2018-06-20 12:22:22 -0400
commitd98c71dadc2d0debdb80beb5a478baf1e6f98758 (patch)
treebf873c28d3acced1814f8b2dba4ae69d2ed77333 /net/ipv4/tcp.c
parentd67b6a2065076d763c7df626b8c54f16038ad862 (diff)
parentdaf0678c2036c918f01e4aa6035629d2debc2f30 (diff)
Merge drm-upstream/drm-next into drm-misc-next
We got a few conflicts in drm_atomic.c after merging the DRM writeback support, now we need a backmerge to unlock develop development on drm-misc-next. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 9ce1c726185e..c9d00ef54dec 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -697,7 +697,7 @@ static bool tcp_should_autocork(struct sock *sk, struct sk_buff *skb,
697{ 697{
698 return skb->len < size_goal && 698 return skb->len < size_goal &&
699 sock_net(sk)->ipv4.sysctl_tcp_autocorking && 699 sock_net(sk)->ipv4.sysctl_tcp_autocorking &&
700 skb != tcp_write_queue_head(sk) && 700 !tcp_rtx_queue_empty(sk) &&
701 refcount_read(&sk->sk_wmem_alloc) > skb->truesize; 701 refcount_read(&sk->sk_wmem_alloc) > skb->truesize;
702} 702}
703 703
@@ -1204,7 +1204,8 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size)
1204 uarg->zerocopy = 0; 1204 uarg->zerocopy = 0;
1205 } 1205 }
1206 1206
1207 if (unlikely(flags & MSG_FASTOPEN || inet_sk(sk)->defer_connect)) { 1207 if (unlikely(flags & MSG_FASTOPEN || inet_sk(sk)->defer_connect) &&
1208 !tp->repair) {
1208 err = tcp_sendmsg_fastopen(sk, msg, &copied_syn, size); 1209 err = tcp_sendmsg_fastopen(sk, msg, &copied_syn, size);
1209 if (err == -EINPROGRESS && copied_syn > 0) 1210 if (err == -EINPROGRESS && copied_syn > 0)
1210 goto out; 1211 goto out;
@@ -2673,7 +2674,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level,
2673 case TCP_REPAIR_QUEUE: 2674 case TCP_REPAIR_QUEUE:
2674 if (!tp->repair) 2675 if (!tp->repair)
2675 err = -EPERM; 2676 err = -EPERM;
2676 else if (val < TCP_QUEUES_NR) 2677 else if ((unsigned int)val < TCP_QUEUES_NR)
2677 tp->repair_queue = val; 2678 tp->repair_queue = val;
2678 else 2679 else
2679 err = -EINVAL; 2680 err = -EINVAL;