From: Ilpo Järvinen Date: Thu, 3 Dec 2009 06:24:02 +0000 (-0800) Subject: tcp: clear hints to avoid a stale one (nfs only affected?) X-Git-Tag: v2.6.33-rc1~388^2~47 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8818a9d884e3a589899be3303958fff182e98e55;p=platform%2Fkernel%2Flinux-3.10.git tcp: clear hints to avoid a stale one (nfs only affected?) Eric Dumazet mentioned in a context of another problem: "Well, it seems NFS reuses its socket, so maybe we miss some cleaning as spotted in this old patch" I've not check under which conditions that actually happens but if true, we need to make sure we don't accidently leave stale hints behind when the write queue had to be purged (whether reusing with NFS can actually happen if purging took place is something I'm not sure of). ...At least it compiles. Signed-off-by: Ilpo Järvinen Signed-off-by: David S. Miller --- diff --git a/include/net/tcp.h b/include/net/tcp.h index 28b04ff..e2d2ca2 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1229,6 +1229,7 @@ static inline void tcp_write_queue_purge(struct sock *sk) while ((skb = __skb_dequeue(&sk->sk_write_queue)) != NULL) sk_wmem_free_skb(sk, skb); sk_mem_reclaim(sk); + tcp_clear_all_retrans_hints(tcp_sk(sk)); } static inline struct sk_buff *tcp_write_queue_head(struct sock *sk)