aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/tcp_output.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 76f840917bcb..80147ba44141 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1530,13 +1530,6 @@ static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle)
1530 int cwnd_quota; 1530 int cwnd_quota;
1531 int result; 1531 int result;
1532 1532
1533 /* If we are closed, the bytes will have to remain here.
1534 * In time closedown will finish, we empty the write queue and all
1535 * will be happy.
1536 */
1537 if (unlikely(sk->sk_state == TCP_CLOSE))
1538 return 0;
1539
1540 sent_pkts = 0; 1533 sent_pkts = 0;
1541 1534
1542 /* Do MTU probing. */ 1535 /* Do MTU probing. */
@@ -1608,10 +1601,18 @@ void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
1608{ 1601{
1609 struct sk_buff *skb = tcp_send_head(sk); 1602 struct sk_buff *skb = tcp_send_head(sk);
1610 1603
1611 if (skb) { 1604 if (!skb)
1612 if (tcp_write_xmit(sk, cur_mss, nonagle)) 1605 return;
1613 tcp_check_probe_timer(sk); 1606
1614 } 1607 /* If we are closed, the bytes will have to remain here.
1608 * In time closedown will finish, we empty the write queue and
1609 * all will be happy.
1610 */
1611 if (unlikely(sk->sk_state == TCP_CLOSE))
1612 return;
1613
1614 if (tcp_write_xmit(sk, cur_mss, nonagle))
1615 tcp_check_probe_timer(sk);
1615} 1616}
1616 1617
1617/* Send _single_ skb sitting at the send head. This function requires 1618/* Send _single_ skb sitting at the send head. This function requires