Access idle_rebind.cnt is always protected by gcwq->lock, don't need to init it as 1.
Signed-off-by: Lai Jiangshan <la...@cn.fujitsu.com> --- kernel/workqueue.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index ed23c9a..9f38a65 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -1394,7 +1394,7 @@ static void rebind_workers(struct global_cwq *gcwq) * us to finish up by competing on pool->manager_mutex. */ init_completion(&idle_rebind.done); - idle_rebind.cnt = 1; + idle_rebind.cnt = 0; INIT_COMPLETION(idle_rebind.done); /* set REBIND and kick idle ones, we'll wait for these later */ @@ -1435,7 +1435,7 @@ static void rebind_workers(struct global_cwq *gcwq) } /* waiting for all idle workers to be rebound */ - if (--idle_rebind.cnt) { + if (idle_rebind.cnt) { spin_unlock_irq(&gcwq->lock); wait_for_completion(&idle_rebind.done); spin_lock_irq(&gcwq->lock); -- 1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/