diff options
author | Krishna Kumar <krkumar2@in.ibm.com> | 2009-12-08 17:26:13 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-23 17:13:28 -0500 |
commit | 12d50c46dc0f7fd2e625c4befaa5fa5740a7a594 (patch) | |
tree | 03e0179cd2d0e7d02f67623ee2760a5fe6c3fcac /net/ipv4/tcp_output.c | |
parent | 7ef8a2127a64d131c4dbe5b843e5708f6e75552b (diff) |
tcp: Remove check in __tcp_push_pending_frames
tcp_push checks tcp_send_head and calls __tcp_push_pending_frames,
which again checks tcp_send_head, and this unnecessary check is
done for every other caller of __tcp_push_pending_frames.
Remove tcp_send_head check in __tcp_push_pending_frames and add
the check to tcp_push_pending_frames. Other functions call
__tcp_push_pending_frames only when tcp_send_head would evaluate
to true.
Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Acked-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r-- | net/ipv4/tcp_output.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 383ce237640f..12b2af36eab8 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1794,11 +1794,6 @@ static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, | |||
1794 | void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss, | 1794 | void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss, |
1795 | int nonagle) | 1795 | int nonagle) |
1796 | { | 1796 | { |
1797 | struct sk_buff *skb = tcp_send_head(sk); | ||
1798 | |||
1799 | if (!skb) | ||
1800 | return; | ||
1801 | |||
1802 | /* If we are closed, the bytes will have to remain here. | 1797 | /* If we are closed, the bytes will have to remain here. |
1803 | * In time closedown will finish, we empty the write queue and | 1798 | * In time closedown will finish, we empty the write queue and |
1804 | * all will be happy. | 1799 | * all will be happy. |