]> git.baikalelectronics.ru Git - kernel.git/commit
workqueue: Make worker_attach/detach_pool() update worker->pool
authorTejun Heo <tj@kernel.org>
Fri, 18 May 2018 15:47:13 +0000 (08:47 -0700)
committerTejun Heo <tj@kernel.org>
Fri, 18 May 2018 15:47:13 +0000 (08:47 -0700)
commit2620c1eb3bc4a6deb5c947c39d99caad6a185226
tree1b3253129ac2bfdf227cc6171cbf7578a383f8a9
parent5a989f12c80c256b5c2958e5c70558f858180b06
workqueue: Make worker_attach/detach_pool() update worker->pool

For historical reasons, the worker attach/detach functions don't
currently manage worker->pool and the callers are manually and
inconsistently updating it.

This patch moves worker->pool updates into the worker attach/detach
functions.  This makes worker->pool consistent and clearly defines how
worker->pool updates are synchronized.

This will help later workqueue visibility improvements by allowing
safe access to workqueue information from worker->task.

Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c
kernel/workqueue_internal.h