@@ -477,6 +477,15 @@ static int validate_dl_change(struct cpuset *cur, struct cpuset *trial)
struct cpuset *cs;
/*
+ * We can't shrink if we won't have enough room for SCHED_DEADLINE
+ * tasks.
+ */
+ if (is_cpu_exclusive(cur) &&
+ !cpuset_cpumask_can_shrink(cur->cpus_allowed,
+ trial->cpus_allowed))
+ goto out;
+
+ /*
* The cpuset.sched_load_balance flag is flipped off on
* the current cpuset.
*/
@@ -606,16 +615,6 @@ static int validate_change(struct cpuset *cur, struct cpuset *trial)
goto out;
}
- /*
- * We can't shrink if we won't have enough room for SCHED_DEADLINE
- * tasks.
- */
- ret = -EBUSY;
- if (is_cpu_exclusive(cur) &&
- !cpuset_cpumask_can_shrink(cur->cpus_allowed,
- trial->cpus_allowed))
- goto out;
-
ret = 0;
out:
rcu_read_unlock();
Having two different places to validate DL operations makes no sense. As such move everything in the same function. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> --- kernel/cgroup/cpuset.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) -- 2.7.4