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
@ -90,12 +90,7 @@ struct neigh_statistics
|
||||
unsigned long unres_discards; /* number of unresolved drops */
|
||||
};
|
||||
|
||||
#define NEIGH_CACHE_STAT_INC(tbl, field) \
|
||||
do { \
|
||||
preempt_disable(); \
|
||||
(per_cpu_ptr((tbl)->stats, smp_processor_id())->field)++; \
|
||||
preempt_enable(); \
|
||||
} while (0)
|
||||
#define NEIGH_CACHE_STAT_INC(tbl, field) this_cpu_inc((tbl)->stats->field)
|
||||
|
||||
struct neighbour
|
||||
{
|
||||
|
Reference in New Issue
Block a user