mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
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:
parent
c353071ad0
commit
046386ca0c
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user