Skip to content

Commit

Permalink
blk-mq: fix allocation of set->tags
Browse files Browse the repository at this point in the history
type of set->tags is struct blk_mq_tags **.

Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
ming1 authored and axboe committed Apr 21, 2014
1 parent 11471e0 commit 4847900
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4847900

Please sign in to comment.