workqueue: use LIST_HEAD to initialize cull_list
PATCH 1/1 workqueue: use LIST_HEAD to initialize cull_list
Use LIST_HEAD() to initialize cull_list instead of open-coding it.
Signed-off-by Yang Yingliang <[email protected]>
--- kernel/workqueue.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
kernel/workqueue.c +2 -5
@@ -2307,9 +2307,8 @@ static void idle_worker_timeout(struct timer_list *t)static void idle_cull_fn (struct work_struct *work) { struct worker_pool *pool = container_of(work, struct worker_pool, idle_cull_work); -struct list_head cull_list; +LIST_HEAD (cull_list); -INIT_LIST_HEAD (&cull_list);/* * Grabbing wq_pool_attach_mutex here ensures an already-running worker * cannot proceed beyong worker_detach_from_pool() in its self-destruct
@@ -3875,10 +3874,8 @@ static void rcu_free_pool(struct rcu_head *rcu)static void put_unbound_pool (struct worker_pool *pool) {DECLARE_COMPLETION_ONSTACK (detach_completion); -struct list_head cull_list;struct worker *worker; - -INIT_LIST_HEAD (&cull_list); +LIST_HEAD (cull_list);lockdep_assert_held (&wq_pool_mutex);
Signature · 1 line
2.25.1
Quoted 4 lines · Yang Yingliang
Use
LIST_HEAD()to initializecull_listinstead of open-coding it.Signed-off-by Yang Yingliang <[email protected]>
Reviewed-by Lai Jiangshan <[email protected]>
Quoted 34 lines
--- kernel/workqueue.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)kernel/workqueue.c +2
-6@@ -2307,9 +2307,8 @@ static void idle_worker_timeout(struct timer_list *t)static void idle_cull_fn (struct work_struct *work) { struct worker_pool *pool = container_of(work, struct worker_pool, idle_cull_work); -struct list_head cull_list; +LIST_HEAD (cull_list); -INIT_LIST_HEAD (&cull_list);/* * Grabbing wq_pool_attach_mutex here ensures an already-running worker * cannot proceed beyong worker_detach_from_pool() in its self-destruct @@ -3875,10 +3874,8 @@ static void rcu_free_pool(struct rcu_head *rcu)static void put_unbound_pool (struct worker_pool *pool) {DECLARE_COMPLETION_ONSTACK (detach_completion); -struct list_head cull_list;struct worker *worker; - -INIT_LIST_HEAD (&cull_list); +LIST_HEAD (cull_list);lockdep_assert_held (&wq_pool_mutex); --2.25.1
Tejun Heo
maintainerQuoted 7 lines · Lai Jiangshan
Quoted 4 lines · Yang Yingliang
Use
LIST_HEAD()to initializecull_listinstead of open-coding it.Signed-off-by Yang Yingliang <[email protected]>Reviewed-by Lai Jiangshan <[email protected]>
I don't have this patch in my inbox. Yang, can you pelase resend?
Thanks.
Signature · 1 line
tejun
Quoted 7 lines · Tejun Heo
Quoted 5 lines · Lai Jiangshan
Quoted 3 lines · Yang Yingliang
Use
LIST_HEAD()to initializecull_listinstead of open-coding it.Signed-off-by Yang Yingliang <[email protected]>Reviewed-by Lai Jiangshan <[email protected]>I don't have this patch in my inbox. Yang, can you pelase resend?
OK. I will resend it.
Quoted 3 lines
Thanks.