[Devel] [PATCH vz10 05/14] block: guard cbt_list initialization with CONFIG_BLK_DEV_CBT
Eva Kurchatova
eva.kurchatova at virtuozzo.com
Fri Jun 26 01:08:07 MSK 2026
The cbt_list field in struct request_queue only exists when
CONFIG_BLK_DEV_CBT is enabled. Guard the INIT_LIST_HEAD() call in
blk_alloc_queue() with the corresponding #ifdef to fix the build when
CONFIG_BLK_DEV_CBT is disabled.
Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
https://virtuozzo.atlassian.net/browse/VSTOR-134732
Feature: fix kunit
---
block/blk-core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/blk-core.c b/block/blk-core.c
index a168f2e41b7d..bcc3060de670 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -440,7 +440,9 @@ struct request_queue *blk_alloc_queue(struct queue_limits *lim, int node_id)
init_waitqueue_head(&q->mq_freeze_wq);
mutex_init(&q->mq_freeze_lock);
+#ifdef CONFIG_BLK_DEV_CBT
INIT_LIST_HEAD(&q->cbt_list);
+#endif
blkg_init_queue(q);
--
2.54.0
More information about the Devel
mailing list