summaryrefslogtreecommitdiff
path: root/block/blk-mq.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2018-10-16 23:23:06 +0300
committerJens Axboe <axboe@kernel.dk>2018-11-07 23:44:59 +0300
commita8908939af569ce2419f43fd56eeaf003bc3d85d (patch)
tree9940fd37b26a26ae1d63f94365fe97c862fa65d9 /block/blk-mq.h
parenta0fedc857dff457e123aeaa2039d28ac90e543df (diff)
downloadlinux-a8908939af569ce2419f43fd56eeaf003bc3d85d.tar.xz
blk-mq: kill q->mq_map
It's just a pointer to set->mq_map, use that instead. Move the assignment a bit earlier, so we always know it's valid. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r--block/blk-mq.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 9497b47e2526..9536be06d022 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -75,7 +75,9 @@ extern int blk_mq_hw_queue_to_node(unsigned int *map, unsigned int);
static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
int cpu)
{
- return q->queue_hw_ctx[q->mq_map[cpu]];
+ struct blk_mq_tag_set *set = q->tag_set;
+
+ return q->queue_hw_ctx[set->mq_map[cpu]];
}
/*