[PATCH v2 1/5] workqueue: Use POOL_BH instead of WQ_BH when checking pool flags

Breno Leitao posted 5 patches 1 month ago
[PATCH v2 1/5] workqueue: Use POOL_BH instead of WQ_BH when checking pool flags
Posted by Breno Leitao 1 month ago
pr_cont_worker_id() checks pool->flags against WQ_BH, which is a
workqueue-level flag (defined in workqueue.h). Pool flags use a
separate namespace with POOL_* constants (defined in workqueue.c).
The correct constant is POOL_BH. Both WQ_BH and POOL_BH are defined
as (1 << 0) so this has no behavioral impact, but it is semantically
wrong and inconsistent with every other pool-level BH check in the
file.

Fixes: 4cb1ef64609f ("workqueue: Implement BH workqueues to eventually replace tasklets")
Signed-off-by: Breno Leitao <leitao@debian.org>
---
 kernel/workqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index aeaec79bc09c4..1e5b6cb0fbda6 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -6274,7 +6274,7 @@ static void pr_cont_worker_id(struct worker *worker)
 {
 	struct worker_pool *pool = worker->pool;
 
-	if (pool->flags & WQ_BH)
+	if (pool->flags & POOL_BH)
 		pr_cont("bh%s",
 			pool->attrs->nice == HIGHPRI_NICE_LEVEL ? "-hi" : "");
 	else

-- 
2.47.3
Re: [PATCH v2 1/5] workqueue: Use POOL_BH instead of WQ_BH when checking pool flags
Posted by Song Liu 1 month ago
On Thu, Mar 5, 2026 at 8:16 AM Breno Leitao <leitao@debian.org> wrote:
>
> pr_cont_worker_id() checks pool->flags against WQ_BH, which is a
> workqueue-level flag (defined in workqueue.h). Pool flags use a
> separate namespace with POOL_* constants (defined in workqueue.c).
> The correct constant is POOL_BH. Both WQ_BH and POOL_BH are defined
> as (1 << 0) so this has no behavioral impact, but it is semantically
> wrong and inconsistent with every other pool-level BH check in the
> file.
>
> Fixes: 4cb1ef64609f ("workqueue: Implement BH workqueues to eventually replace tasklets")
> Signed-off-by: Breno Leitao <leitao@debian.org>

Acked-by: Song Liu <song@kernel.org>