sched: fix cpu hotplug, cleanup

Clean up __migrate_task(): to just have separate "done" and "fail"
cases, instead of that "out" case with random error behavior.

Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by Linus Torvalds and committed by Ingo Molnar b1e38734 dc7fab8b

Changed files
+5 -6
kernel
+5 -6
kernel/sched.c
··· 5621 5621 5622 5622 double_rq_lock(rq_src, rq_dest); 5623 5623 /* Already moved. */ 5624 - if (task_cpu(p) != src_cpu) { 5625 - ret = 1; 5626 - goto out; 5627 - } 5624 + if (task_cpu(p) != src_cpu) 5625 + goto done; 5628 5626 /* Affinity changed (again). */ 5629 5627 if (!cpu_isset(dest_cpu, p->cpus_allowed)) 5630 - goto out; 5628 + goto fail; 5631 5629 5632 5630 on_rq = p->se.on_rq; 5633 5631 if (on_rq) ··· 5636 5638 activate_task(rq_dest, p, 0); 5637 5639 check_preempt_curr(rq_dest, p); 5638 5640 } 5641 + done: 5639 5642 ret = 1; 5640 - out: 5643 + fail: 5641 5644 double_rq_unlock(rq_src, rq_dest); 5642 5645 return ret; 5643 5646 }