this_cpu: Use this_cpu ops for network statistics
Acked-by: Tejun Heo <tj@kernel.org> Acked-by: David Miller <davem@davemloft.net> Signed-off-by: Christoph Lameter <cl@linux-foundation.org> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
committed by
Tejun Heo
parent
fce22848a1
commit
4ea7334b6d
@@ -295,11 +295,11 @@ extern unsigned int nf_conntrack_htable_size;
|
||||
extern unsigned int nf_conntrack_max;
|
||||
|
||||
#define NF_CT_STAT_INC(net, count) \
|
||||
(per_cpu_ptr((net)->ct.stat, raw_smp_processor_id())->count++)
|
||||
__this_cpu_inc((net)->ct.stat->count)
|
||||
#define NF_CT_STAT_INC_ATOMIC(net, count) \
|
||||
do { \
|
||||
local_bh_disable(); \
|
||||
per_cpu_ptr((net)->ct.stat, raw_smp_processor_id())->count++; \
|
||||
__this_cpu_inc((net)->ct.stat->count); \
|
||||
local_bh_enable(); \
|
||||
} while (0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user