]> Gentwo Git Trees - linux/.git/commitdiff
cpuset: remove need_rebuild_sched_domains
authorChen Ridong <chenridong@huawei.com>
Tue, 11 Nov 2025 13:24:29 +0000 (13:24 +0000)
committerTejun Heo <tj@kernel.org>
Tue, 11 Nov 2025 21:47:08 +0000 (11:47 -1000)
Previously, update_cpumasks_hier() used need_rebuild_sched_domains to
decide whether to invoke rebuild_sched_domains_locked(). Now that
rebuild_sched_domains_locked() only sets force_rebuild, the flag is
redundant. Hence, remove it.

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

index ca3d3f2450ae017c2715fad3366a0b056525662e..976bce6e5673c4d4b5f0f2f12893f60f40e530f1 100644 (file)
@@ -2184,7 +2184,6 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp,
 {
        struct cpuset *cp;
        struct cgroup_subsys_state *pos_css;
-       bool need_rebuild_sched_domains = false;
        int old_prs, new_prs;
 
        rcu_read_lock();
@@ -2348,15 +2347,12 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp,
                if (!cpumask_empty(cp->cpus_allowed) &&
                    is_sched_load_balance(cp) &&
                   (!cpuset_v2() || is_partition_valid(cp)))
-                       need_rebuild_sched_domains = true;
+                       cpuset_force_rebuild();
 
                rcu_read_lock();
                css_put(&cp->css);
        }
        rcu_read_unlock();
-
-       if (need_rebuild_sched_domains)
-               cpuset_force_rebuild();
 }
 
 /**