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>
This commit is contained in:
committed by
David S. Miller
parent
7ef8a2127a
commit
12d50c46dc
@@ -1794,11 +1794,6 @@ static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
|
||||
void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
|
||||
int nonagle)
|
||||
{
|
||||
struct sk_buff *skb = tcp_send_head(sk);
|
||||
|
||||
if (!skb)
|
||||
return;
|
||||
|
||||
/* If we are closed, the bytes will have to remain here.
|
||||
* In time closedown will finish, we empty the write queue and
|
||||
* all will be happy.
|
||||
|
Reference in New Issue
Block a user