[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1332144734-9375-2-git-send-email-laijs@cn.fujitsu.com>
Date: Mon, 19 Mar 2012 16:12:11 +0800
From: Lai Jiangshan <laijs@...fujitsu.com>
To: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc: Lai Jiangshan <laijs@...fujitsu.com>, linux-kernel@...r.kernel.org,
mingo@...e.hu, dipankar@...ibm.com, akpm@...ux-foundation.org,
mathieu.desnoyers@...ymtl.ca, josh@...htriplett.org,
niv@...ibm.com, tglx@...utronix.de, peterz@...radead.org,
rostedt@...dmis.org, Valdis.Kletnieks@...edu, dhowells@...hat.com,
eric.dumazet@...il.com, darren@...art.com, fweisbec@...il.com,
patches@...aro.org
Subject: [PATCH 1/4 V2] rcu: fix srcu_readers_active()
After patch "implement Peter's checking algorithm" applied,
SRCU_REF_MASK is not existed.
Also remove unused @cpu in srcu_readers_active_idx_check().
Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
---
kernel/srcu.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/kernel/srcu.c b/kernel/srcu.c
index 1bed654..9e86ed7 100644
--- a/kernel/srcu.c
+++ b/kernel/srcu.c
@@ -108,7 +108,6 @@ static unsigned long srcu_readers_active_idx(struct srcu_struct *sp, int idx)
static bool srcu_readers_active_idx_check(struct srcu_struct *sp, int idx)
{
- int cpu;
unsigned long seq;
seq = srcu_readers_seq_idx(sp, idx);
@@ -186,7 +185,7 @@ static int srcu_readers_active(struct srcu_struct *sp)
sum += ACCESS_ONCE(per_cpu_ptr(sp->per_cpu_ref, cpu)->c[0]);
sum += ACCESS_ONCE(per_cpu_ptr(sp->per_cpu_ref, cpu)->c[1]);
}
- return sum & SRCU_REF_MASK;
+ return sum;
}
/**
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists