blk-mq: fix allocation of set->tags
authorMing Lei <tom.leiming@gmail.com>
Sat, 19 Apr 2014 10:00:17 +0000 (18:00 +0800)
committerJens Axboe <axboe@fb.com>
Mon, 21 Apr 2014 16:38:36 +0000 (10:38 -0600)
type of set->tags is struct blk_mq_tags **.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c

index 5fbbb221d4997319ffd49cc277d3f4c14a5925c8..c2777970f28bd3188c5fc033116292c2ed290d50 100644 (file)
@@ -1537,7 +1537,8 @@ int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
                return -EINVAL;
 
 
-       set->tags = kmalloc_node(set->nr_hw_queues * sizeof(struct blk_mq_tags),
+       set->tags = kmalloc_node(set->nr_hw_queues *
+                                sizeof(struct blk_mq_tags *),
                                 GFP_KERNEL, set->numa_node);
        if (!set->tags)
                goto out;