]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
cpuset: Fix missing adaptation for cpuset_is_populated
authorChen Ridong <chenridong@huawei.com>
Wed, 14 Jan 2026 01:51:29 +0000 (01:51 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Feb 2026 15:31:35 +0000 (16:31 +0100)
Commit b1bcaed1e39a ("cpuset: Treat cpusets in attaching as populated")
was backported to the long‑term support (LTS) branches. However, because
commit d5cf4d34a333 ("cgroup/cpuset: Don't track # of local child
partitions") was not backported, a corresponding adaptation to the
backported code is still required.

To ensure correct behavior, replace cgroup_is_populated with
cpuset_is_populated in the partition_is_populated function.

Cc: stable@vger.kernel.org # 6.1+
Fixes: b1bcaed1e39a ("cpuset: Treat cpusets in attaching as populated")
Cc: Waiman Long <longman@redhat.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Chen Ridong <chenridong@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/cgroup/cpuset.c

index 61b56b6ca66a76f05cd819fb1d907ec2ad5d31f2..1245418cc8b3bdd4e92337a10787dd4bd80492ec 100644 (file)
@@ -385,7 +385,7 @@ static inline bool partition_is_populated(struct cpuset *cs,
            cs->attach_in_progress)
                return true;
        if (!excluded_child && !cs->nr_subparts)
-               return cgroup_is_populated(cs->css.cgroup);
+               return cpuset_is_populated(cs);
 
        rcu_read_lock();
        cpuset_for_each_descendant_pre(cp, pos_css, cs) {