aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/cpuset.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 89d4ed08afba..407611ba371b 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -873,7 +873,7 @@ static void update_cpumasks_hier(struct cpuset *cs, struct cpumask *new_cpus)
873 * If it becomes empty, inherit the effective mask of the 873 * If it becomes empty, inherit the effective mask of the
874 * parent, which is guaranteed to have some CPUs. 874 * parent, which is guaranteed to have some CPUs.
875 */ 875 */
876 if (cpumask_empty(new_cpus)) 876 if (cgroup_on_dfl(cp->css.cgroup) && cpumask_empty(new_cpus))
877 cpumask_copy(new_cpus, parent->effective_cpus); 877 cpumask_copy(new_cpus, parent->effective_cpus);
878 878
879 /* Skip the whole subtree if the cpumask remains the same. */ 879 /* 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)
1129 * If it becomes empty, inherit the effective mask of the 1129 * If it becomes empty, inherit the effective mask of the
1130 * parent, which is guaranteed to have some MEMs. 1130 * parent, which is guaranteed to have some MEMs.
1131 */ 1131 */
1132 if (nodes_empty(*new_mems)) 1132 if (cgroup_on_dfl(cp->css.cgroup) && nodes_empty(*new_mems))
1133 *new_mems = parent->effective_mems; 1133 *new_mems = parent->effective_mems;
1134 1134
1135 /* Skip the whole subtree if the nodemask remains the same. */ 1135 /* Skip the whole subtree if the nodemask remains the same. */