diff options
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r-- | include/linux/cgroup.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index 63deb70f3149..515927eebb37 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h | |||
@@ -30,7 +30,6 @@ struct css_id; | |||
30 | 30 | ||
31 | extern int cgroup_init_early(void); | 31 | extern int cgroup_init_early(void); |
32 | extern int cgroup_init(void); | 32 | extern int cgroup_init(void); |
33 | extern int cgroup_lock_is_held(void); | ||
34 | extern void cgroup_fork(struct task_struct *p); | 33 | extern void cgroup_fork(struct task_struct *p); |
35 | extern void cgroup_post_fork(struct task_struct *p); | 34 | extern void cgroup_post_fork(struct task_struct *p); |
36 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); | 35 | extern void cgroup_exit(struct task_struct *p, int run_callbacks); |
@@ -552,10 +551,16 @@ static inline struct cgroup_subsys_state *cgroup_subsys_state( | |||
552 | * rcu_dereference_check() conditions, such as locks used during the | 551 | * rcu_dereference_check() conditions, such as locks used during the |
553 | * cgroup_subsys::attach() methods. | 552 | * cgroup_subsys::attach() methods. |
554 | */ | 553 | */ |
554 | #ifdef CONFIG_PROVE_RCU | ||
555 | extern struct mutex cgroup_mutex; | ||
555 | #define task_subsys_state_check(task, subsys_id, __c) \ | 556 | #define task_subsys_state_check(task, subsys_id, __c) \ |
556 | rcu_dereference_check(task->cgroups->subsys[subsys_id], \ | 557 | rcu_dereference_check((task)->cgroups->subsys[(subsys_id)], \ |
557 | lockdep_is_held(&task->alloc_lock) || \ | 558 | lockdep_is_held(&(task)->alloc_lock) || \ |
558 | cgroup_lock_is_held() || (__c)) | 559 | lockdep_is_held(&cgroup_mutex) || (__c)) |
560 | #else | ||
561 | #define task_subsys_state_check(task, subsys_id, __c) \ | ||
562 | rcu_dereference((task)->cgroups->subsys[(subsys_id)]) | ||
563 | #endif | ||
559 | 564 | ||
560 | static inline struct cgroup_subsys_state * | 565 | static inline struct cgroup_subsys_state * |
561 | task_subsys_state(struct task_struct *task, int subsys_id) | 566 | task_subsys_state(struct task_struct *task, int subsys_id) |