mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
cpuset: Fix the bug that subpart_cpus updated wrongly in update_cpumask()
subparts_cpus should be limited as a subset of cpus_allowed, but it is
updated wrongly by using cpumask_andnot(). Use cpumask_and() instead to
fix it.
Fixes: ee8dde0cd2
("cpuset: Add new v2 cpuset.sched.partition flag")
Signed-off-by: Tianchen Ding <dtcccc@linux.alibaba.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
d068eebbd4
commit
c80d401c52
1 changed files with 1 additions and 2 deletions
|
@ -1635,8 +1635,7 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
|
||||||
* Make sure that subparts_cpus is a subset of cpus_allowed.
|
* Make sure that subparts_cpus is a subset of cpus_allowed.
|
||||||
*/
|
*/
|
||||||
if (cs->nr_subparts_cpus) {
|
if (cs->nr_subparts_cpus) {
|
||||||
cpumask_andnot(cs->subparts_cpus, cs->subparts_cpus,
|
cpumask_and(cs->subparts_cpus, cs->subparts_cpus, cs->cpus_allowed);
|
||||||
cs->cpus_allowed);
|
|
||||||
cs->nr_subparts_cpus = cpumask_weight(cs->subparts_cpus);
|
cs->nr_subparts_cpus = cpumask_weight(cs->subparts_cpus);
|
||||||
}
|
}
|
||||||
spin_unlock_irq(&callback_lock);
|
spin_unlock_irq(&callback_lock);
|
||||||
|
|
Loading…
Add table
Reference in a new issue