ipv4: icmp: use this_cpu_read() in icmp_sk()
authorEric Dumazet <edumazet@google.com>
Sat, 1 Jun 2019 02:09:02 +0000 (19:09 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Jun 2019 22:08:53 +0000 (15:08 -0700)
this_cpu_read(*X) is faster than *this_cpu_ptr(X)

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

index f3a5893..49d6b03 100644 (file)
@@ -206,7 +206,7 @@ static const struct icmp_control icmp_pointers[NR_ICMP_TYPES+1];
  */
 static struct sock *icmp_sk(struct net *net)
 {
-       return *this_cpu_ptr(net->ipv4.icmp_sk);
+       return this_cpu_read(*net->ipv4.icmp_sk);
 }
 
 /* Called with BH disabled */