Messages in this thread Patch in this message | | | From | Lai Jiangshan <> | Subject | [PATCH 6/7] workqueue: init 0 for idle_rebind.cnt | Date | Tue, 28 Aug 2012 01:58:26 +0800 |
| |
Access idle_rebind.cnt is always protected by gcwq->lock, don't need to init it as 1.
Signed-off-by: Lai Jiangshan <laijs@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
| |