summaryrefslogtreecommitdiff
path: root/net/ipv4/icmp.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-06-01 05:09:02 +0300
committerDavid S. Miller <davem@davemloft.net>2019-06-04 01:08:53 +0300
commit046386ca0c48cca1d91563db63a8eb0aff71f2b7 (patch)
treeebbcd22afd226d801e7803eb6563295955e8b819 /net/ipv4/icmp.c
parentc353071ad0a2ef754fcba4153098e3cdc5ca516e (diff)
downloadlinux-046386ca0c48cca1d91563db63a8eb0aff71f2b7.tar.xz
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 */