* [PATCH] blk-mq: Explicitly zero-init blk_mq_tags.active_queues
@ 2020-05-26 10:45 John Garry
0 siblings, 0 replies; only message in thread
From: John Garry @ 2020-05-26 10:45 UTC (permalink / raw)
To: axboe; +Cc: linux-block, linux-kernel, John Garry
As is good practice, explicitly zero-init atomic_t type
blk_mq_tags.active_queues.
Signed-off-by: John Garry <john.garry@huawei.com>
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index 586c9d6e904a..cbbd0af9f3b0 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -469,6 +469,7 @@ struct blk_mq_tags *blk_mq_init_tags(unsigned int total_tags,
tags->nr_tags = total_tags;
tags->nr_reserved_tags = reserved_tags;
+ atomic_set(&tags->active_queues, 0);
return blk_mq_init_bitmap_tags(tags, node, alloc_policy);
}
--
2.16.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-05-26 10:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 10:45 [PATCH] blk-mq: Explicitly zero-init blk_mq_tags.active_queues John Garry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).