tcp: Do not reload skb pointer after skb_gro_receive().
authorDavid Miller <davem@davemloft.net>
Tue, 12 Jun 2018 01:00:13 +0000 (18:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Jun 2018 03:00:56 +0000 (20:00 -0700)
This is not necessary.  skb_gro_receive() will never change what
'head' points to.

In it's original implementation (see commit 71d93b39e52e ("net: Add
skb_gro_receive")), it did:

====================
+ *head = nskb;
+ nskb->next = p->next;
+ p->next = NULL;
====================

This sequence was removed in commit 58025e46ea2d ("net: gro: remove
obsolete code from skb_gro_receive()")

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Eric Dumazet <edumazet@google.com>
net/ipv4/tcp_offload.c

index 4d58e2ce0b5b181b39aeb12f8761ba016606dd43..8cc7c348733052a8ef4bc06d09149171d8277006 100644 (file)
@@ -268,8 +268,6 @@ found:
                goto out_check_final;
        }
 
-       p = *head;
-       th2 = tcp_hdr(p);
        tcp_flag_word(th2) |= flags & (TCP_FLAG_FIN | TCP_FLAG_PSH);
 
 out_check_final: