diff --git a/include/net/tcp.h b/include/net/tcp.h index cdef98f089fc..3289ca9d8c72 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1354,6 +1354,7 @@ static inline void tcp_write_queue_purge(struct sock *sk) sk_wmem_free_skb(sk, skb); sk_mem_reclaim(sk); tcp_clear_all_retrans_hints(tcp_sk(sk)); + inet_csk(sk)->icsk_backoff = 0; } static inline struct sk_buff *tcp_write_queue_head(const struct sock *sk) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 44c0b3bc172c..cbfce7e394fe 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2329,7 +2329,6 @@ int tcp_disconnect(struct sock *sk, int flags) tp->srtt = 0; if ((tp->write_seq += tp->max_window + 2) == 0) tp->write_seq = 1; - icsk->icsk_backoff = 0; tp->snd_cwnd = 2; icsk->icsk_probes_out = 0; tp->packets_out = 0;