Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d67c58e9ae80ea577785111534e49d3ca757ec50
Commit:     d67c58e9ae80ea577785111534e49d3ca757ec50
Parent:     50c4817e9919132639be0adc387b509e04a9ed0a
Author:     Ilpo Järvinen <[EMAIL PROTECTED]>
AuthorDate: Sun Dec 2 00:48:01 2007 +0200
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 14:55:43 2008 -0800

    [TCP]: Remove local variable and use packets_in_flight directly
    
    Lines won't be that long and it's compiler's job to optimize
    them.
    
    Signed-off-by: Ilpo Järvinen <[EMAIL PROTECTED]>
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/tcp_output.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index c2aa468..b41176f 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1293,7 +1293,6 @@ static int tcp_mtu_probe(struct sock *sk)
        int len;
        int probe_size;
        int size_needed;
-       unsigned int pif;
        int copy;
        int mss_now;
 
@@ -1326,11 +1325,9 @@ static int tcp_mtu_probe(struct sock *sk)
        if (after(tp->snd_nxt + size_needed, tp->snd_una + tp->snd_wnd))
                return 0;
 
-       /* Do we need to wait to drain cwnd? */
-       pif = tcp_packets_in_flight(tp);
-       if (pif + 2 > tp->snd_cwnd) {
-               /* With no packets in flight, don't stall. */
-               if (pif == 0)
+       /* Do we need to wait to drain cwnd? With none in flight, don't stall */
+       if (tcp_packets_in_flight(tp) + 2 > tp->snd_cwnd) {
+               if (!tcp_packets_in_flight(tp))
                        return -1;
                else
                        return 0;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to