diff mbox

[1/4,V2] rcu: fix srcu_readers_active()

Message ID 1332144734-9375-2-git-send-email-laijs@cn.fujitsu.com
State New
Headers show

Commit Message

Lai Jiangshan March 19, 2012, 8:12 a.m. UTC
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@cn.fujitsu.com>
---
 kernel/srcu.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
diff mbox

Patch

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;
 }
 
 /**