Commit d67c58e9 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by David S. Miller

[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: default avatarIlpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 50c4817e
...@@ -1293,7 +1293,6 @@ static int tcp_mtu_probe(struct sock *sk) ...@@ -1293,7 +1293,6 @@ static int tcp_mtu_probe(struct sock *sk)
int len; int len;
int probe_size; int probe_size;
int size_needed; int size_needed;
unsigned int pif;
int copy; int copy;
int mss_now; int mss_now;
...@@ -1326,11 +1325,9 @@ static int tcp_mtu_probe(struct sock *sk) ...@@ -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)) if (after(tp->snd_nxt + size_needed, tp->snd_una + tp->snd_wnd))
return 0; return 0;
/* Do we need to wait to drain cwnd? */ /* Do we need to wait to drain cwnd? With none in flight, don't stall */
pif = tcp_packets_in_flight(tp); if (tcp_packets_in_flight(tp) + 2 > tp->snd_cwnd) {
if (pif + 2 > tp->snd_cwnd) { if (!tcp_packets_in_flight(tp))
/* With no packets in flight, don't stall. */
if (pif == 0)
return -1; return -1;
else else
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment