[PATCH 3/7] workqueue: Remove cpus_read_lock() from apply_wqattrs_lock()

From: Lai Jiangshan
Date: Thu Jul 11 2024 - 04:35:55 EST


From: Lai Jiangshan <jiangshan.ljs@xxxxxxxxxxxx>

The pwq creations and installations have been reworked based on
wq_online_cpumask rather than cpu_online_mask.

So cpus_read_lock() is unneeded during wqattrs changes.

Signed-off-by: Lai Jiangshan <jiangshan.ljs@xxxxxxxxxxxx>
---
kernel/workqueue.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 9f454a9c04c8..64876d391e7c 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5123,15 +5123,12 @@ static struct pool_workqueue *alloc_unbound_pwq(struct workqueue_struct *wq,

static void apply_wqattrs_lock(void)
{
- /* CPUs should stay stable across pwq creations and installations */
- cpus_read_lock();
mutex_lock(&wq_pool_mutex);
}

static void apply_wqattrs_unlock(void)
{
mutex_unlock(&wq_pool_mutex);
- cpus_read_unlock();
}

/**
--
2.19.1.6.gb485710b