Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[deliverable/linux.git] / kernel / sched.c
index 87f1f47beffe95527fa36c5b3efef16a481aba76..c535cc4f6428bcd09405c2f4a3322f9b41de7eaa 100644 (file)
@@ -2045,11 +2045,10 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
 
        trace_sched_migrate_task(p, new_cpu);
 
-       if (task_cpu(p) == new_cpu)
-               return;
-
-       p->se.nr_migrations++;
-       perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, 1, NULL, 0);
+       if (task_cpu(p) != new_cpu) {
+               p->se.nr_migrations++;
+               perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, 1, NULL, 0);
+       }
 
        __set_task_cpu(p, new_cpu);
 }
This page took 0.026296 seconds and 5 git commands to generate.