Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cpuset: add lockdep_assert_cpuset_lock_held helper

Add lockdep_assert_cpuset_lock_held() to allow other subsystems to verify
that cpuset_mutex is held.

Suggested-by: Waiman Long <longman@redhat.com>
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Chen Ridong and committed by
Tejun Heo
14c11e1b 6ee43047

+7
+2
include/linux/cpuset.h
··· 74 74 extern void dec_dl_tasks_cs(struct task_struct *task); 75 75 extern void cpuset_lock(void); 76 76 extern void cpuset_unlock(void); 77 + extern void lockdep_assert_cpuset_lock_held(void); 77 78 extern void cpuset_cpus_allowed_locked(struct task_struct *p, struct cpumask *mask); 78 79 extern void cpuset_cpus_allowed(struct task_struct *p, struct cpumask *mask); 79 80 extern bool cpuset_cpus_allowed_fallback(struct task_struct *p); ··· 196 195 static inline void dec_dl_tasks_cs(struct task_struct *task) { } 197 196 static inline void cpuset_lock(void) { } 198 197 static inline void cpuset_unlock(void) { } 198 + static inline void lockdep_assert_cpuset_lock_held(void) { } 199 199 200 200 static inline void cpuset_cpus_allowed_locked(struct task_struct *p, 201 201 struct cpumask *mask)
+5
kernel/cgroup/cpuset.c
··· 271 271 mutex_unlock(&cpuset_mutex); 272 272 } 273 273 274 + void lockdep_assert_cpuset_lock_held(void) 275 + { 276 + lockdep_assert_held(&cpuset_mutex); 277 + } 278 + 274 279 /** 275 280 * cpuset_full_lock - Acquire full protection for cpuset modification 276 281 *