tcp: remove redundant rcv_nxt update
authorYafang Shao <laoar.shao@gmail.com>
Sat, 14 Jul 2018 08:36:29 +0000 (16:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Jul 2018 18:21:40 +0000 (11:21 -0700)
tcp_rcv_nxt_update() is already executed in tcp_data_queue().
This line is redundant.

See bellow,
tcp_queue_rcv
tcp_rcv_nxt_update(tcp_sk(sk), TCP_SKB_CB(skb)->end_seq);
tcp_rcv_nxt_update(tp, TCP_SKB_CB(skb)->end_seq); <<<< redundant

Signed-off-by: Yafang Shao <laoar.shao@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/tcp_input.c

index d3b6390ecf2311215e6a9698f423754d580f28f4..fac5d03d45281a240ef759f26a178de9a366641a 100644 (file)
@@ -4695,7 +4695,6 @@ queue_and_out:
                }
 
                eaten = tcp_queue_rcv(sk, skb, 0, &fragstolen);
-               tcp_rcv_nxt_update(tp, TCP_SKB_CB(skb)->end_seq);
                if (skb->len)
                        tcp_event_data_recv(sk, skb);
                if (TCP_SKB_CB(skb)->tcp_flags & TCPHDR_FIN)