[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1346841475-4422-10-git-send-email-laijs@cn.fujitsu.com>
Date: Wed, 5 Sep 2012 18:37:46 +0800
From: Lai Jiangshan <laijs@...fujitsu.com>
To: Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org
Cc: Lai Jiangshan <laijs@...fujitsu.com>
Subject: [PATCH 09/11 V5] workqueue: rebind newly created worker
when the newly created needs to be rebound. exile it!
it will rebind itself in worker_thead().
It just prepares, this code is useless until
"we unbind/rebind without manager_mutex"
Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
---
kernel/workqueue.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 223d128..819c84e 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1838,6 +1838,11 @@ static void manager_start_worker(struct worker *worker, struct worker *manager)
/* copy the flags. also unbind the worker if the manager is unbound */
worker->flags |= manager->flags & WORKER_COPY_FLAGS;
+
+ if (need_to_rebind_worker(worker)) {
+ /* exile it, and let it rebind itself */
+ list_del_init(&worker->entry);
+ }
}
/**
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists