[TCP]: Fix double adjustment of tp->{lost,left}_out in tcp_fragment().
authorHerbert Xu <herbert@gondor.apana.org.au>
Sun, 11 Sep 2005 00:19:09 +0000 (17:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Sep 2005 00:19:09 +0000 (17:19 -0700)
There is an extra left_out/lost_out adjustment in tcp_fragment which
means that the lost_out accounting is always wrong.  This patch removes
that chunk of code.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_output.c

index 15e1134da1b2af9e8aba4e110078455d4739894a..c10e4435e3b1258a9ca0b5615be8af6d103142a2 100644 (file)
@@ -485,11 +485,6 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
        TCP_SKB_CB(buff)->when = TCP_SKB_CB(skb)->when;
        buff->tstamp = skb->tstamp;
 
-       if (TCP_SKB_CB(skb)->sacked & TCPCB_LOST) {
-               tp->lost_out -= tcp_skb_pcount(skb);
-               tp->left_out -= tcp_skb_pcount(skb);
-       }
-
        old_factor = tcp_skb_pcount(skb);
 
        /* Fix up tso_factor for both original and new SKB.  */