rcu: Put all orphan-callback-related code under same comment
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 19 Jan 2015 01:46:24 +0000 (17:46 -0800)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Wed, 11 Mar 2015 20:22:37 +0000 (13:22 -0700)
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/rcu/tree.c

index 8e020c5..98da632 100644 (file)
@@ -2385,9 +2385,9 @@ static void rcu_cleanup_dead_cpu(int cpu, struct rcu_state *rsp)
 
        /* Exclude any attempts to start a new grace period. */
        mutex_lock(&rsp->onoff_mutex);
-       raw_spin_lock_irqsave(&rsp->orphan_lock, flags);
 
        /* Orphan the dead CPU's callbacks, and adopt them if appropriate. */
+       raw_spin_lock_irqsave(&rsp->orphan_lock, flags);
        rcu_send_cbs_to_orphanage(cpu, rsp, rnp, rdp);
        rcu_adopt_orphan_cbs(rsp, flags);
        raw_spin_unlock_irqrestore(&rsp->orphan_lock, flags);