aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 55c521780f93..9d6fb731559b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1559,9 +1559,6 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
1559 unsigned long flags; 1559 unsigned long flags;
1560 long old_state; 1560 long old_state;
1561 struct rq *rq; 1561 struct rq *rq;
1562#ifdef CONFIG_SMP
1563 int new_cpu;
1564#endif
1565 1562
1566 rq = task_rq_lock(p, &flags); 1563 rq = task_rq_lock(p, &flags);
1567 old_state = p->state; 1564 old_state = p->state;
@@ -1579,9 +1576,9 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
1579 if (unlikely(task_running(rq, p))) 1576 if (unlikely(task_running(rq, p)))
1580 goto out_activate; 1577 goto out_activate;
1581 1578
1582 new_cpu = p->sched_class->select_task_rq(p, sync); 1579 cpu = p->sched_class->select_task_rq(p, sync);
1583 if (new_cpu != cpu) { 1580 if (cpu != orig_cpu) {
1584 set_task_cpu(p, new_cpu); 1581 set_task_cpu(p, cpu);
1585 task_rq_unlock(rq, &flags); 1582 task_rq_unlock(rq, &flags);
1586 /* might preempt at this point */ 1583 /* might preempt at this point */
1587 rq = task_rq_lock(p, &flags); 1584 rq = task_rq_lock(p, &flags);
@@ -1608,10 +1605,8 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
1608 } 1605 }
1609 } 1606 }
1610 } 1607 }
1611
1612#endif 1608#endif
1613 1609
1614
1615out_activate: 1610out_activate:
1616#endif /* CONFIG_SMP */ 1611#endif /* CONFIG_SMP */
1617 schedstat_inc(p, se.nr_wakeups); 1612 schedstat_inc(p, se.nr_wakeups);