|
@@ -856,14 +856,15 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
|
|
|
if (!cpumask_subset(trialcs->cpus_allowed, cpu_active_mask))
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
- retval = validate_change(cs, trialcs);
|
|
|
- if (retval < 0)
|
|
|
- return retval;
|
|
|
|
|
|
/* Nothing to do if the cpus didn't change */
|
|
|
if (cpumask_equal(cs->cpus_allowed, trialcs->cpus_allowed))
|
|
|
return 0;
|
|
|
|
|
|
+ retval = validate_change(cs, trialcs);
|
|
|
+ if (retval < 0)
|
|
|
+ return retval;
|
|
|
+
|
|
|
retval = heap_init(&heap, PAGE_SIZE, GFP_KERNEL, NULL);
|
|
|
if (retval)
|
|
|
return retval;
|