ipv4: icmp: use this_cpu_read() in icmp_sk()

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>
This commit is contained in:
Eric Dumazet 2019-05-31 19:09:02 -07:00 committed by David S. Miller
parent c353071ad0
commit 046386ca0c

View 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 */