|
@@ -2232,8 +2232,7 @@ static DECLARE_BITMAP(proto_inuse_idx, PROTO_INUSE_NR);
|
|
#ifdef CONFIG_NET_NS
|
|
#ifdef CONFIG_NET_NS
|
|
void sock_prot_inuse_add(struct net *net, struct proto *prot, int val)
|
|
void sock_prot_inuse_add(struct net *net, struct proto *prot, int val)
|
|
{
|
|
{
|
|
- int cpu = smp_processor_id();
|
|
|
|
- per_cpu_ptr(net->core.inuse, cpu)->val[prot->inuse_idx] += val;
|
|
|
|
|
|
+ __this_cpu_add(net->core.inuse->val[prot->inuse_idx], val);
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(sock_prot_inuse_add);
|
|
EXPORT_SYMBOL_GPL(sock_prot_inuse_add);
|
|
|
|
|
|
@@ -2279,7 +2278,7 @@ static DEFINE_PER_CPU(struct prot_inuse, prot_inuse);
|
|
|
|
|
|
void sock_prot_inuse_add(struct net *net, struct proto *prot, int val)
|
|
void sock_prot_inuse_add(struct net *net, struct proto *prot, int val)
|
|
{
|
|
{
|
|
- __get_cpu_var(prot_inuse).val[prot->inuse_idx] += val;
|
|
|
|
|
|
+ __this_cpu_add(prot_inuse.val[prot->inuse_idx], val);
|
|
}
|
|
}
|
|
EXPORT_SYMBOL_GPL(sock_prot_inuse_add);
|
|
EXPORT_SYMBOL_GPL(sock_prot_inuse_add);
|
|
|
|
|