Commit:     d2da272a4e581e831e3567a37ef167686f1ea1d3
Parent:     f7b4cddcc5aca03e80e357360c9424dfba5056c2
Author:     Oleg Nesterov <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:30:56 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:43:03 2007 -0700

    migration_call(CPU_DEAD): use spin_lock_irq() instead of task_rq_lock()
    Change migration_call(CPU_DEAD) to use direct spin_lock_irq() instead of
    task_rq_lock(rq->idle), rq->idle can't change its task_rq().
    This makes the code a bit more symmetrical with migrate_dead_tasks()'s path
    which uses spin_lock_irq/spin_unlock_irq.
    Signed-off-by: Oleg Nesterov <[EMAIL PROTECTED]>
    Cc: Cliff Wickman <[EMAIL PROTECTED]>
    Cc: Gautham R Shenoy <[EMAIL PROTECTED]>
    Cc: Ingo Molnar <[EMAIL PROTECTED]>
    Cc: Srivatsa Vaddagiri <[EMAIL PROTECTED]>
    Cc: Akinobu Mita <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 kernel/sched.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index c747bc9..c4889ab 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -5457,14 +5457,14 @@ migration_call(struct notifier_block *nfb, unsigned 
long action, void *hcpu)
                rq->migration_thread = NULL;
                /* Idle task back to normal (off runqueue, low prio) */
-               rq = task_rq_lock(rq->idle, &flags);
+               spin_lock_irq(&rq->lock);
                deactivate_task(rq, rq->idle, 0);
                rq->idle->static_prio = MAX_PRIO;
                __setscheduler(rq, rq->idle, SCHED_NORMAL, 0);
                rq->idle->sched_class = &idle_sched_class;
-               task_rq_unlock(rq, &flags);
+               spin_unlock_irq(&rq->lock);
                BUG_ON(rq->nr_running != 0);
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to