hotplug-use-migrate-disable.patch

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Thomas Gleixner 2011-07-17 19:35:29 +02:00 committed by Alibek Omarov
parent 8b62194956
commit 7437514384
1 changed files with 3 additions and 3 deletions

View File

@ -400,14 +400,13 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
cpumask_andnot(cpumask, cpu_online_mask, cpumask_of(cpu));
set_cpus_allowed_ptr(current, cpumask);
free_cpumask_var(cpumask);
preempt_disable();
migrate_disable();
mycpu = smp_processor_id();
if (mycpu == cpu) {
printk(KERN_ERR "Yuck! Still on unplug CPU\n!");
preempt_enable();
migrate_enable();
return -EBUSY;
}
preempt_enable();
cpu_hotplug_begin();
err = cpu_unplug_begin(cpu);
@ -476,6 +475,7 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
out_release:
cpu_unplug_done(cpu);
out_cancel:
migrate_enable();
cpu_hotplug_done();
if (!err)
cpu_notify_nofail(CPU_POST_DEAD | mod, hcpu);