]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_output.c
[TCP]: Re-place highest_sack check to a more robust position
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_output.c
index cbb83acd830a89009ae88f522551340bcd267399..94c80113df7e06e3e3e92e63b5db6fde7c72f889 100644 (file)
@@ -1718,6 +1718,10 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m
                BUG_ON(tcp_skb_pcount(skb) != 1 ||
                       tcp_skb_pcount(next_skb) != 1);
 
+               if (WARN_ON(tp->sacked_out &&
+                   (TCP_SKB_CB(next_skb)->seq == tp->highest_sack)))
+                       return;
+
                /* Ok.  We will be able to collapse the packet. */
                tcp_unlink_write_queue(next_skb, sk);
 
@@ -1734,10 +1738,6 @@ static void tcp_retrans_try_collapse(struct sock *sk, struct sk_buff *skb, int m
                /* Update sequence range on original skb. */
                TCP_SKB_CB(skb)->end_seq = TCP_SKB_CB(next_skb)->end_seq;
 
-               if (WARN_ON(tp->sacked_out &&
-                   (TCP_SKB_CB(next_skb)->seq == tp->highest_sack)))
-                       return;
-
                /* Merge over control information. */
                flags |= TCP_SKB_CB(next_skb)->flags; /* This moves PSH/FIN etc. over */
                TCP_SKB_CB(skb)->flags = flags;