summaryrefslogtreecommitdiffstats
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorWaiman Long <longman@redhat.com>2024-02-08 17:10:11 +0100
committerTejun Heo <tj@kernel.org>2024-02-08 20:22:30 +0100
commit26fb7e3dda4c16e2cfe2164a1e7315a9386602db (patch)
tree32fb8878cb0ae92a6934c5e5cecdb8c19aba2249 /kernel/workqueue.c
parentMerge branch 'for-6.8-fixes' into for-6.9 (diff)
downloadlinux-26fb7e3dda4c16e2cfe2164a1e7315a9386602db.tar.xz
linux-26fb7e3dda4c16e2cfe2164a1e7315a9386602db.zip
workqueue: Link pwq's into wq->pwqs from oldest to newest
Add a new pwq into the tail of wq->pwqs so that pwq iteration will start from the oldest pwq to the newest. This ordering will facilitate the inclusion of ordered workqueues in a wq_unbound_cpumask update. Signed-off-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index cf514ba0dfc3..fa7bd3b34f52 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4804,7 +4804,7 @@ static void link_pwq(struct pool_workqueue *pwq)
pwq->work_color = wq->work_color;
/* link in @pwq */
- list_add_rcu(&pwq->pwqs_node, &wq->pwqs);
+ list_add_tail_rcu(&pwq->pwqs_node, &wq->pwqs);
}
/* obtain a pool matching @attr and create a pwq associating the pool and @wq */