Re: [PATCH v4 11/13] blk-mq: Refactor and rename blk_mq_free_map_and_{requests->rqs}()

From: John Garry
Date: Mon Sep 27 2021 - 05:37:32 EST

On 27/09/2021 10:19, Ming Lei wrote:
However, apart from this, I can change __blk_mq_free_map_and_rqs() to
NULLify set->tags[i], as it is always passed set->tags[i].

Do you have a preference?
I meant there are 5 following uses in your patch:

+ blk_mq_free_map_and_rqs(set, set->tags[i], i);
+ set->tags[i] = NULL;

and one new helper(blk_mq_free_set_map_and_rqs(set, i)?) can be added for just
doing that,

Ah, ok, but in the next patch we replace these blk_mq_free_map_and_rqs() calls with __blk_mq_free_map_and_rqs(), and __blk_mq_free_map_and_rqs() is always passed set->tags[i], so we do as you request there, i.e. NULLify set->tags[i] in __blk_mq_free_map_and_rqs().