]> www.infradead.org Git - users/hch/xfs.git/commit
workqueue: Remove useless pool->dying_workers
authorLai Jiangshan <jiangshan.ljs@antgroup.com>
Fri, 21 Jun 2024 07:32:25 +0000 (15:32 +0800)
committerTejun Heo <tj@kernel.org>
Fri, 21 Jun 2024 22:34:02 +0000 (12:34 -1000)
commita071b043ab13ae1f5d12ba6f267936feb800dff8
treeb55224e85b15f9f9438feebc1ac9ff893372f3ef
parentf4b7b53c94afdec6dd0f1f834cfcc40595ddc916
workqueue: Remove useless pool->dying_workers

A dying worker is first moved from pool->workers to pool->dying_workers
in set_worker_dying() and removed from pool->dying_workers in
detach_dying_workers().  The whole procedure is in the some lock context
of wq_pool_attach_mutex.

So pool->dying_workers is useless, just remove it and keep the dying
worker in pool->workers after set_worker_dying() and remove it in
detach_dying_workers() with wq_pool_attach_mutex held.

Cc: Valentin Schneider <vschneid@redhat.com>
Signed-off-by: Lai Jiangshan <jiangshan.ljs@antgroup.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c