diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-02-22 20:04:50 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-25 04:34:26 -0500 |
commit | d11c563dd20ff35da5652c3e1c989d9e10e1d6d0 (patch) | |
tree | b189f50de7a01d7603935d4da7e755d764dfe67e /kernel/cgroup.c | |
parent | a898def29e4119bc01ebe7ca97423181f4c0ea2d (diff) |
sched: Use lockdep-based checking on rcu_dereference()
Update the rcu_dereference() usages to take advantage of the new
lockdep-based checking.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <1266887105-1528-6-git-send-email-paulmck@linux.vnet.ibm.com>
[ -v2: fix allmodconfig missing symbol export build failure on x86 ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index aa3bee566446..b1a0f5a528fe 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -166,6 +166,20 @@ static DEFINE_SPINLOCK(hierarchy_id_lock); | |||
166 | */ | 166 | */ |
167 | static int need_forkexit_callback __read_mostly; | 167 | static int need_forkexit_callback __read_mostly; |
168 | 168 | ||
169 | #ifdef CONFIG_PROVE_LOCKING | ||
170 | int cgroup_lock_is_held(void) | ||
171 | { | ||
172 | return lockdep_is_held(&cgroup_mutex); | ||
173 | } | ||
174 | #else /* #ifdef CONFIG_PROVE_LOCKING */ | ||
175 | int cgroup_lock_is_held(void) | ||
176 | { | ||
177 | return mutex_is_locked(&cgroup_mutex); | ||
178 | } | ||
179 | #endif /* #else #ifdef CONFIG_PROVE_LOCKING */ | ||
180 | |||
181 | EXPORT_SYMBOL_GPL(cgroup_lock_is_held); | ||
182 | |||
169 | /* convenient tests for these bits */ | 183 | /* convenient tests for these bits */ |
170 | inline int cgroup_is_removed(const struct cgroup *cgrp) | 184 | inline int cgroup_is_removed(const struct cgroup *cgrp) |
171 | { | 185 | { |