aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/tcp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r--include/net/tcp.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h
index e5ff4083870d..3e097e39d4d2 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -1535,6 +1535,7 @@ static inline void tcp_write_queue_purge(struct sock *sk)
1535{ 1535{
1536 struct sk_buff *skb; 1536 struct sk_buff *skb;
1537 1537
1538 tcp_chrono_stop(sk, TCP_CHRONO_BUSY);
1538 while ((skb = __skb_dequeue(&sk->sk_write_queue)) != NULL) 1539 while ((skb = __skb_dequeue(&sk->sk_write_queue)) != NULL)
1539 sk_wmem_free_skb(sk, skb); 1540 sk_wmem_free_skb(sk, skb);
1540 sk_mem_reclaim(sk); 1541 sk_mem_reclaim(sk);
@@ -1593,8 +1594,10 @@ static inline void tcp_advance_send_head(struct sock *sk, const struct sk_buff *
1593 1594
1594static inline void tcp_check_send_head(struct sock *sk, struct sk_buff *skb_unlinked) 1595static inline void tcp_check_send_head(struct sock *sk, struct sk_buff *skb_unlinked)
1595{ 1596{
1596 if (sk->sk_send_head == skb_unlinked) 1597 if (sk->sk_send_head == skb_unlinked) {
1597 sk->sk_send_head = NULL; 1598 sk->sk_send_head = NULL;
1599 tcp_chrono_stop(sk, TCP_CHRONO_BUSY);
1600 }
1598 if (tcp_sk(sk)->highest_sack == skb_unlinked) 1601 if (tcp_sk(sk)->highest_sack == skb_unlinked)
1599 tcp_sk(sk)->highest_sack = NULL; 1602 tcp_sk(sk)->highest_sack = NULL;
1600} 1603}
@@ -1616,6 +1619,7 @@ static inline void tcp_add_write_queue_tail(struct sock *sk, struct sk_buff *skb
1616 /* Queue it, remembering where we must start sending. */ 1619 /* Queue it, remembering where we must start sending. */
1617 if (sk->sk_send_head == NULL) { 1620 if (sk->sk_send_head == NULL) {
1618 sk->sk_send_head = skb; 1621 sk->sk_send_head = skb;
1622 tcp_chrono_start(sk, TCP_CHRONO_BUSY);
1619 1623
1620 if (tcp_sk(sk)->highest_sack == NULL) 1624 if (tcp_sk(sk)->highest_sack == NULL)
1621 tcp_sk(sk)->highest_sack = skb; 1625 tcp_sk(sk)->highest_sack = skb;