aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c14
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 */
167static int need_forkexit_callback __read_mostly; 167static int need_forkexit_callback __read_mostly;
168 168
169#ifdef CONFIG_PROVE_LOCKING
170int cgroup_lock_is_held(void)
171{
172 return lockdep_is_held(&cgroup_mutex);
173}
174#else /* #ifdef CONFIG_PROVE_LOCKING */
175int cgroup_lock_is_held(void)
176{
177 return mutex_is_locked(&cgroup_mutex);
178}
179#endif /* #else #ifdef CONFIG_PROVE_LOCKING */
180
181EXPORT_SYMBOL_GPL(cgroup_lock_is_held);
182
169/* convenient tests for these bits */ 183/* convenient tests for these bits */
170inline int cgroup_is_removed(const struct cgroup *cgrp) 184inline int cgroup_is_removed(const struct cgroup *cgrp)
171{ 185{