OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c353071
)
ipv4: icmp: use this_cpu_read() in icmp_sk()
author
Eric Dumazet
<edumazet@google.com>
Sat, 1 Jun 2019 02:09:02 +0000
(19:09 -0700)
committer
David 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
patch
|
blob
|
history
diff --git
a/net/ipv4/icmp.c
b/net/ipv4/icmp.c
index
f3a5893
..
49d6b03
100644
(file)
--- 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 */