diff options
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 1d5331a1b1dc..8ce50dc3ab8c 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -2518,9 +2518,11 @@ u32 __tcp_select_window(struct sock *sk) | |||
2518 | int full_space = min_t(int, tp->window_clamp, allowed_space); | 2518 | int full_space = min_t(int, tp->window_clamp, allowed_space); |
2519 | int window; | 2519 | int window; |
2520 | 2520 | ||
2521 | if (mss > full_space) | 2521 | if (unlikely(mss > full_space)) { |
2522 | mss = full_space; | 2522 | mss = full_space; |
2523 | 2523 | if (mss <= 0) | |
2524 | return 0; | ||
2525 | } | ||
2524 | if (free_space < (full_space >> 1)) { | 2526 | if (free_space < (full_space >> 1)) { |
2525 | icsk->icsk_ack.quick = 0; | 2527 | icsk->icsk_ack.quick = 0; |
2526 | 2528 | ||