From 046386ca0c48cca1d91563db63a8eb0aff71f2b7 Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Fri, 31 May 2019 19:09:02 -0700 Subject: 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 Signed-off-by: David S. Miller --- net/ipv4/icmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/ipv4') diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index f3a5893b1e86..49d6b037b113 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c @@ -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 */ -- cgit v1.2.3-59-g8ed1b