diff options
author | John Garry <[email protected]> | 2021-10-05 18:23:33 +0800 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2021-10-18 06:17:02 -0600 |
commit | 4f245d5bf0f7432c881e22a77066160a6cba8e03 (patch) | |
tree | a88320f1fd3d8657b5f737f5df4f7605cefef3c8 | |
parent | f32e4eafaf29aa493bdea3123dac09ad135b599b (diff) |
blk-mq: Don't clear driver tags own mapping
Function blk_mq_clear_rq_mapping() is required to clear the sched tags
mappings in driver tags rqs[].
But there is no need for a driver tags to clear its own mapping, so skip
clearing the mapping in this scenario.
Signed-off-by: John Garry <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Ming Lei <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r-- | block/blk-mq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 0619298d82b4..38cffe362a29 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2317,6 +2317,10 @@ static void blk_mq_clear_rq_mapping(struct blk_mq_tags *drv_tags, struct page *page; unsigned long flags; + /* There is no need to clear a driver tags own mapping */ + if (drv_tags == tags) + return; + list_for_each_entry(page, &tags->page_list, lru) { unsigned long start = (unsigned long)page_address(page); unsigned long end = start + order_to_size(page->private); |