summaryrefslogtreecommitdiff
path: root/block/blk-mq.c
diff options
context:
space:
mode:
authorMinwoo Im <minwoo.im.dev@gmail.com>2018-07-02 17:46:43 +0300
committerJens Axboe <axboe@kernel.dk>2018-07-09 18:07:53 +0300
commit0da73d00ca111a6175825a00d94dbeae185f6d7e (patch)
tree9885b0b946b98ecf4b4ea37d62b8e507df5f8a52 /block/blk-mq.c
parent5efac89c849849ad3a959224eb711f9c311e5bde (diff)
downloadlinux-0da73d00ca111a6175825a00d94dbeae185f6d7e.tar.xz
blk-mq: code clean-up by adding an API to clear set->mq_map
set->mq_map is now currently cleared if something goes wrong when establishing a queue map in blk-mq-pci.c. It's also cleared before updating a queue map in blk_mq_update_queue_map(). This patch provides an API to clear set->mq_map to make it clear. Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r--block/blk-mq.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 7c6ff13171ef..3cc074ae5c59 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2683,7 +2683,6 @@ static int blk_mq_alloc_rq_maps(struct blk_mq_tag_set *set)
static int blk_mq_update_queue_map(struct blk_mq_tag_set *set)
{
if (set->ops->map_queues) {
- int cpu;
/*
* transport .map_queues is usually done in the following
* way:
@@ -2698,8 +2697,7 @@ static int blk_mq_update_queue_map(struct blk_mq_tag_set *set)
* killing stale mapping since one CPU may not be mapped
* to any hw queue.
*/
- for_each_possible_cpu(cpu)
- set->mq_map[cpu] = 0;
+ blk_mq_clear_mq_map(set);
return set->ops->map_queues(set);
} else