workqueue: Use cond_resched_rcu_qs macro
authorJoe Lawrence <joe.lawrence@stratus.com>
Sun, 5 Oct 2014 17:24:22 +0000 (13:24 -0400)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Mon, 6 Oct 2014 12:58:26 +0000 (05:58 -0700)
Tidy up and use cond_resched_rcu_qs when calling cond_resched and
reporting potential quiescent state to RCU.  Splitting this change in
this way allows easy backporting to -stable for kernel versions not
having cond_resched_rcu_qs().

Signed-off-by: Joe Lawrence <joe.lawrence@stratus.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
kernel/workqueue.c

index 345bec95e7080032c9de52b38faeb2669462cbe3..09b685daee3d8c18e2004a2333583e1c7e00f706 100644 (file)
@@ -2046,8 +2046,7 @@ __acquires(&pool->lock)
         * stop_machine. At the same time, report a quiescent RCU state so
         * the same condition doesn't freeze RCU.
         */
-       rcu_note_voluntary_context_switch(current);
-       cond_resched();
+       cond_resched_rcu_qs();
 
        spin_lock_irq(&pool->lock);