summaryrefslogtreecommitdiffstats
path: root/net/ipv4/icmp.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-06-01 04:09:02 +0200
committerDavid S. Miller <davem@davemloft.net>2019-06-04 00:08:53 +0200
commit046386ca0c48cca1d91563db63a8eb0aff71f2b7 (patch)
treeebbcd22afd226d801e7803eb6563295955e8b819 /net/ipv4/icmp.c
parentipv6: use this_cpu_read() in rt6_get_pcpu_route() (diff)
downloadlinux-046386ca0c48cca1d91563db63a8eb0aff71f2b7.tar.xz
linux-046386ca0c48cca1d91563db63a8eb0aff71f2b7.zip
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>
Diffstat (limited to 'net/ipv4/icmp.c')
-rw-r--r--net/ipv4/icmp.c2
1 files changed, 1 insertions, 1 deletions
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 */