diff options
author | Tejun Heo <tj@kernel.org> | 2018-05-18 08:47:13 -0700 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2018-05-18 08:47:13 -0700 |
commit | a2d812a27a4530b999a92f245d0d8291663e8c38 (patch) | |
tree | 1b3253129ac2bfdf227cc6171cbf7578a383f8a9 /kernel/workqueue_internal.h | |
parent | 1258fae73c59e918964455fdead682d79109371a (diff) | |
download | linux-a2d812a27a4530b999a92f245d0d8291663e8c38.tar.gz linux-a2d812a27a4530b999a92f245d0d8291663e8c38.tar.bz2 linux-a2d812a27a4530b999a92f245d0d8291663e8c38.zip |
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>
Diffstat (limited to 'kernel/workqueue_internal.h')
-rw-r--r-- | kernel/workqueue_internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/workqueue_internal.h b/kernel/workqueue_internal.h index d390d1be3748..4a182e027207 100644 --- a/kernel/workqueue_internal.h +++ b/kernel/workqueue_internal.h @@ -37,7 +37,7 @@ struct worker { /* 64 bytes boundary on 64bit, 32 on 32bit */ struct task_struct *task; /* I: worker task */ - struct worker_pool *pool; /* I: the associated pool */ + struct worker_pool *pool; /* A: the associated pool */ /* L: for rescuers */ struct list_head node; /* A: anchored at pool->workers */ /* A: runs through worker->node */ |