Skip to content

Commit

Permalink
blk-mq: Always use blk_mq_is_sbitmap_shared
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolay Borisov <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Himanshu Madhani <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
lorddoskias authored and axboe committed Apr 6, 2021
1 parent 28af742 commit 39aa56d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions block/blk-mq-tag.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ struct blk_mq_tags *blk_mq_init_tags(unsigned int total_tags,
tags->nr_tags = total_tags;
tags->nr_reserved_tags = reserved_tags;

if (flags & BLK_MQ_F_TAG_HCTX_SHARED)
if (blk_mq_is_sbitmap_shared(flags))
return tags;

if (blk_mq_init_bitmap_tags(tags, node, alloc_policy) < 0) {
Expand All @@ -529,7 +529,7 @@ struct blk_mq_tags *blk_mq_init_tags(unsigned int total_tags,

void blk_mq_free_tags(struct blk_mq_tags *tags, unsigned int flags)
{
if (!(flags & BLK_MQ_F_TAG_HCTX_SHARED)) {
if (!blk_mq_is_sbitmap_shared(flags)) {
sbitmap_queue_free(tags->bitmap_tags);
sbitmap_queue_free(tags->breserved_tags);
}
Expand Down

0 comments on commit 39aa56d

Please sign in to comment.