From: Ming Lei Date: Sat, 19 Apr 2014 10:00:17 +0000 (+0800) Subject: blk-mq: fix allocation of set->tags X-Git-Tag: v3.16-rc1~30^2~49^2~67 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=4847900532c2dc0fc77b67f745c20e636d5b3125;p=linux.git blk-mq: fix allocation of set->tags type of set->tags is struct blk_mq_tags **. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei Signed-off-by: Jens Axboe --- diff --git a/block/blk-mq.c b/block/blk-mq.c index 5fbbb221d499..c2777970f28b 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -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;