From 99bb6a24c41d27cff6b0307335760a84b8d0c534 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Sat, 3 Oct 2009 19:48:22 +0900 Subject: [PATCH] --- yaml --- r: 175892 b: refs/heads/master c: 4ea7334b6de818b0123fa4be32af4cb8ac65174c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/neighbour.h | 7 +------ trunk/include/net/netfilter/nf_conntrack.h | 4 ++-- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index e38cf00c1d0e..1f10831ec175 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fce22848a1e9887d92c2a975494b69149808750e +refs/heads/master: 4ea7334b6de818b0123fa4be32af4cb8ac65174c diff --git a/trunk/include/net/neighbour.h b/trunk/include/net/neighbour.h index 3817fda82a80..f28403ff7648 100644 --- a/trunk/include/net/neighbour.h +++ b/trunk/include/net/neighbour.h @@ -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 { diff --git a/trunk/include/net/netfilter/nf_conntrack.h b/trunk/include/net/netfilter/nf_conntrack.h index cbdd6284996d..dde549779e42 100644 --- a/trunk/include/net/netfilter/nf_conntrack.h +++ b/trunk/include/net/netfilter/nf_conntrack.h @@ -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)