]> git.karo-electronics.de Git - linux-beck.git/blobdiff - kernel/sched.c
sched: fix cpu hotplug, cleanup
[linux-beck.git] / kernel / sched.c
index 9397b87101380bba27caac4965d9a6a1a5c763d8..4e2f6033565687f648cbd27e8976ea6c647217fa 100644 (file)
@@ -5621,13 +5621,11 @@ static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu)
 
        double_rq_lock(rq_src, rq_dest);
        /* Already moved. */
-       if (task_cpu(p) != src_cpu) {
-               ret = 1;
-               goto out;
-       }
+       if (task_cpu(p) != src_cpu)
+               goto done;
        /* Affinity changed (again). */
        if (!cpu_isset(dest_cpu, p->cpus_allowed))
-               goto out;
+               goto fail;
 
        on_rq = p->se.on_rq;
        if (on_rq)
@@ -5638,8 +5636,9 @@ static int __migrate_task(struct task_struct *p, int src_cpu, int dest_cpu)
                activate_task(rq_dest, p, 0);
                check_preempt_curr(rq_dest, p);
        }
+done:
        ret = 1;
-out:
+fail:
        double_rq_unlock(rq_src, rq_dest);
        return ret;
 }