tcp: get rid of tcp_check_send_head()
authorEric Dumazet <edumazet@google.com>
Tue, 26 Feb 2019 17:49:09 +0000 (09:49 -0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Feb 2019 21:16:02 +0000 (13:16 -0800)
This helper is used only once, and its name is no longer relevant.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/tcp.h
net/ipv4/tcp.c

index a6e0355921e1d0cf6df3bb20fba8b3d4e9d9ef08..813042c08dc5a7438279821890439b02490391d1 100644 (file)
@@ -1716,12 +1716,6 @@ static inline bool tcp_rtx_and_write_queues_empty(const struct sock *sk)
        return tcp_rtx_queue_empty(sk) && tcp_write_queue_empty(sk);
 }
 
-static inline void tcp_check_send_head(struct sock *sk, struct sk_buff *skb_unlinked)
-{
-       if (tcp_write_queue_empty(sk))
-               tcp_chrono_stop(sk, TCP_CHRONO_BUSY);
-}
-
 static inline void __tcp_add_write_queue_tail(struct sock *sk, struct sk_buff *skb)
 {
        __skb_queue_tail(&sk->sk_write_queue, skb);
index 769508c75dce5a39bd78766d801ca01abb77f4bb..e2fa6eb9f81aa0244ea05d99e2870a3d9294673b 100644 (file)
@@ -1412,7 +1412,8 @@ do_fault:
                /* It is the one place in all of TCP, except connection
                 * reset, where we can be unlinking the send_head.
                 */
-               tcp_check_send_head(sk, skb);
+               if (tcp_write_queue_empty(sk))
+                       tcp_chrono_stop(sk, TCP_CHRONO_BUSY);
                sk_wmem_free_skb(sk, skb);
        }