|
|
@@ -873,7 +873,7 @@ static void update_cpumasks_hier(struct cpuset *cs, struct cpumask *new_cpus)
|
|
|
* If it becomes empty, inherit the effective mask of the
|
|
|
* parent, which is guaranteed to have some CPUs.
|
|
|
*/
|
|
|
- if (cpumask_empty(new_cpus))
|
|
|
+ if (cgroup_on_dfl(cp->css.cgroup) && cpumask_empty(new_cpus))
|
|
|
cpumask_copy(new_cpus, parent->effective_cpus);
|
|
|
|
|
|
/* Skip the whole subtree if the cpumask remains the same. */
|
|
|
@@ -1129,7 +1129,7 @@ static void update_nodemasks_hier(struct cpuset *cs, nodemask_t *new_mems)
|
|
|
* If it becomes empty, inherit the effective mask of the
|
|
|
* parent, which is guaranteed to have some MEMs.
|
|
|
*/
|
|
|
- if (nodes_empty(*new_mems))
|
|
|
+ if (cgroup_on_dfl(cp->css.cgroup) && nodes_empty(*new_mems))
|
|
|
*new_mems = parent->effective_mems;
|
|
|
|
|
|
/* Skip the whole subtree if the nodemask remains the same. */
|