]> err.no Git - linux-2.6/blobdiff - net/ipv4/tcp_output.c
[POWERPC] CPM: Rename commproc to cpm1 and cpm2_common.c to cpm2.c
[linux-2.6] / net / ipv4 / tcp_output.c
index 4f8a8a17891aeb015424d2b78ba2590f53400316..f4c1eef89af0b3ac1e63ed91ecf3725a761d6949 100644 (file)
@@ -1162,8 +1162,7 @@ int tcp_may_send_now(struct sock *sk)
        return (skb &&
                tcp_snd_test(sk, skb, tcp_current_mss(sk, 1),
                             (tcp_skb_is_last(sk, skb) ?
-                             TCP_NAGLE_PUSH :
-                             tp->nonagle)));
+                             tp->nonagle : TCP_NAGLE_PUSH)));
 }
 
 /* Trim TSO SKB to LEN bytes, put the remaining data into a new packet
@@ -1321,12 +1320,7 @@ static int tcp_mtu_probe(struct sock *sk)
        }
 
        /* Have enough data in the send queue to probe? */
-       len = 0;
-       if ((skb = tcp_send_head(sk)) == NULL)
-               return -1;
-       while ((len += skb->len) < size_needed && !tcp_skb_is_last(sk, skb))
-               skb = tcp_write_queue_next(sk, skb);
-       if (len < size_needed)
+       if (tp->write_seq - tp->snd_nxt < size_needed)
                return -1;
 
        if (tp->snd_wnd < size_needed)