Skip to content

Commit

Permalink
[TCP]: Remove superflushious skb == write_queue_tail() check
Browse files Browse the repository at this point in the history
Needed can only be more strict than what was checked by the
earlier common case check for non-tail skbs, thus
cwnd_len <= needed will never match in that case anyway.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ilpo Järvinen authored and David S. Miller committed Apr 16, 2008
1 parent b131dd5 commit 1751540
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/tcp_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ static unsigned int tcp_mss_split_point(struct sock *sk, struct sk_buff *skb,

needed = min(skb->len, window);

if (skb == tcp_write_queue_tail(sk) && cwnd_len <= needed)
if (cwnd_len <= needed)
return cwnd_len;

return needed - needed % mss_now;
Expand Down

0 comments on commit 1751540

Please sign in to comment.