Revert "tcp: Clear sk_send_head after purging the write queue"

This reverts commit e99e7745d0.

Ben Hutchings writes:

>Sorry, this is the same issue that was already fixed by "tcp: reset
>sk_send_head in tcp_write_queue_purge".  You can drop my version from
>the queue for 4.4 and 4.9 and revert it for 4.14.

Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Sasha Levin
2019-08-19 23:17:55 -04:00
committed by Greg Kroah-Hartman
parent 2d45c6f193
commit 480d6d2f39

View File

@@ -1613,8 +1613,6 @@ static inline void tcp_init_send_head(struct sock *sk)
sk->sk_send_head = NULL;
}
static inline void tcp_init_send_head(struct sock *sk);
/* write queue abstraction */
static inline void tcp_write_queue_purge(struct sock *sk)
{
@@ -1623,7 +1621,6 @@ static inline void tcp_write_queue_purge(struct sock *sk)
tcp_chrono_stop(sk, TCP_CHRONO_BUSY);
while ((skb = __skb_dequeue(&sk->sk_write_queue)) != NULL)
sk_wmem_free_skb(sk, skb);
tcp_init_send_head(sk);
sk_mem_reclaim(sk);
tcp_clear_all_retrans_hints(tcp_sk(sk));
tcp_init_send_head(sk);