virtio_blk: replace 0 by HCTX_TYPE_DEFAULT to index blk_mq_tag_set->map

Use HCTX_TYPE_DEFAULT instead of 0 to avoid hardcoding.

Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Dongli Zhang 2019-03-12 09:31:56 +08:00 committed by Jens Axboe
parent a80f36cc64
commit 9bc00750f5

View File

@ -691,7 +691,8 @@ static int virtblk_map_queues(struct blk_mq_tag_set *set)
{
struct virtio_blk *vblk = set->driver_data;
return blk_mq_virtio_map_queues(&set->map[0], vblk->vdev, 0);
return blk_mq_virtio_map_queues(&set->map[HCTX_TYPE_DEFAULT],
vblk->vdev, 0);
}
#ifdef CONFIG_VIRTIO_BLK_SCSI