public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [cgroup/for-next PATCH RESEND] cpuset: replace direct lockdep_assert_held() with lockdep_assert_cpuset_lock_held()
@ 2026-01-12  7:19 Zhao Mengmeng
  2026-01-12 19:32 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Zhao Mengmeng @ 2026-01-12  7:19 UTC (permalink / raw)
  To: longman, tj, hannes, mkoutny; +Cc: zhaomengmeng, cgroups, linux-kernel

From: Zhao Mengmeng <zhaomengmeng@kylinos.cn>

We already added lockdep_assert_cpuset_lock_held(), use this new function
to keep consistency.

Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn>
---
 kernel/cgroup/cpuset.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index 7ac7665f0bb6..44848e43fc8a 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -325,7 +325,7 @@ static inline void check_insane_mems_config(nodemask_t *nodes)
  */
 static inline void dec_attach_in_progress_locked(struct cpuset *cs)
 {
-	lockdep_assert_held(&cpuset_mutex);
+	lockdep_assert_cpuset_lock_held();
 
 	cs->attach_in_progress--;
 	if (!cs->attach_in_progress)
@@ -361,7 +361,7 @@ static inline bool is_in_v2_mode(void)
 
 static inline bool cpuset_is_populated(struct cpuset *cs)
 {
-	lockdep_assert_held(&cpuset_mutex);
+	lockdep_assert_cpuset_lock_held();
 
 	/* Cpusets in the process of attaching should be considered as populated */
 	return cgroup_is_populated(cs->css.cgroup) ||
@@ -913,7 +913,7 @@ void dl_rebuild_rd_accounting(void)
 	int cpu;
 	u64 cookie = ++dl_cookie;
 
-	lockdep_assert_held(&cpuset_mutex);
+	lockdep_assert_cpuset_lock_held();
 	lockdep_assert_cpus_held();
 	lockdep_assert_held(&sched_domains_mutex);
 
@@ -964,7 +964,7 @@ void rebuild_sched_domains_locked(void)
 	int i;
 
 	lockdep_assert_cpus_held();
-	lockdep_assert_held(&cpuset_mutex);
+	lockdep_assert_cpuset_lock_held();
 	force_sd_rebuild = false;
 
 	/* Generate domain masks and attrs */
@@ -1660,7 +1660,7 @@ static int update_parent_effective_cpumask(struct cpuset *cs, int cmd,
 	int parent_prs = parent->partition_root_state;
 	bool nocpu;
 
-	lockdep_assert_held(&cpuset_mutex);
+	lockdep_assert_cpuset_lock_held();
 	WARN_ON_ONCE(is_remote_partition(cs));	/* For local partition only */
 
 	/*
@@ -2232,7 +2232,7 @@ static void update_sibling_cpumasks(struct cpuset *parent, struct cpuset *cs,
 	struct cpuset *sibling;
 	struct cgroup_subsys_state *pos_css;
 
-	lockdep_assert_held(&cpuset_mutex);
+	lockdep_assert_cpuset_lock_held();
 
 	/*
 	 * Check all its siblings and call update_cpumasks_hier()
@@ -3103,7 +3103,7 @@ static nodemask_t cpuset_attach_nodemask_to;
 
 static void cpuset_attach_task(struct cpuset *cs, struct task_struct *task)
 {
-	lockdep_assert_held(&cpuset_mutex);
+	lockdep_assert_cpuset_lock_held();
 
 	if (cs != &top_cpuset)
 		guarantee_active_cpus(task, cpus_attach);
@@ -4029,7 +4029,7 @@ static void __cpuset_cpus_allowed_locked(struct task_struct *tsk, struct cpumask
  */
 void cpuset_cpus_allowed_locked(struct task_struct *tsk, struct cpumask *pmask)
 {
-	lockdep_assert_held(&cpuset_mutex);
+	lockdep_assert_cpuset_lock_held();
 	__cpuset_cpus_allowed_locked(tsk, pmask);
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [cgroup/for-next PATCH RESEND] cpuset: replace direct lockdep_assert_held() with lockdep_assert_cpuset_lock_held()
  2026-01-12  7:19 [cgroup/for-next PATCH RESEND] cpuset: replace direct lockdep_assert_held() with lockdep_assert_cpuset_lock_held() Zhao Mengmeng
@ 2026-01-12 19:32 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2026-01-12 19:32 UTC (permalink / raw)
  To: Zhao Mengmeng
  Cc: Waiman Long, Johannes Weiner, Michal Koutný, cgroups,
	linux-kernel

Applied to cgroup/for-6.20 with the cpuset_is_populated() hunk dropped as
the function was moved to the header file by a preceding patch.

Thanks.

--
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-12 19:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-12  7:19 [cgroup/for-next PATCH RESEND] cpuset: replace direct lockdep_assert_held() with lockdep_assert_cpuset_lock_held() Zhao Mengmeng
2026-01-12 19:32 ` Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox