]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
cpuset: remove unused assignment to trialcs->partition_root_state
authorChen Ridong <chenridong@huawei.com>
Wed, 17 Sep 2025 06:04:45 +0000 (06:04 +0000)
committerTejun Heo <tj@kernel.org>
Wed, 17 Sep 2025 18:35:28 +0000 (08:35 -1000)
The trialcs->partition_root_state field is not used during the
configuration of 'cpuset.cpus' or 'cpuset.cpus.exclusive'. Therefore,
the assignment of values to this field can be safely removed.

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 12012ce62777262f0f1c3d7b4db494408e39b3a2..bea7e6ef5d5d138e549b88dce487063a397327ad 100644 (file)
@@ -2363,7 +2363,6 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
                 * trialcs->effective_xcpus is used as a temporary cpumask
                 * for checking validity of the partition root.
                 */
-               trialcs->partition_root_state = PRS_MEMBER;
                if (!cpumask_empty(trialcs->exclusive_cpus) || is_partition_valid(cs))
                        compute_effective_exclusive_cpumask(trialcs, NULL, cs);
        }
@@ -2497,7 +2496,6 @@ static int update_exclusive_cpumask(struct cpuset *cs, struct cpuset *trialcs,
                return 0;
 
        if (*buf) {
-               trialcs->partition_root_state = PRS_MEMBER;
                /*
                 * Reject the change if there is exclusive CPUs conflict with
                 * the siblings.