Commit 91cdf265b74bf63a69949d6db08a60523207400c
Committed by
Jens Axboe
1 parent
7aa390ec2d
blk-mq: add helper allocating tagset->tags
tagset->set is allocated from blk_mq_alloc_tag_set() rather than being reallocated. This patch added a helper to make its meaning explicitly which is to allocate rather than to reallocate. Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Showing 1 changed file with 7 additions and 1 deletions Side-by-side Diff
block/blk-mq.c
... | ... | @@ -3382,6 +3382,12 @@ |
3382 | 3382 | return 0; |
3383 | 3383 | } |
3384 | 3384 | |
3385 | +static int blk_mq_alloc_tag_set_tags(struct blk_mq_tag_set *set, | |
3386 | + int new_nr_hw_queues) | |
3387 | +{ | |
3388 | + return blk_mq_realloc_tag_set_tags(set, 0, new_nr_hw_queues); | |
3389 | +} | |
3390 | + | |
3385 | 3391 | /* |
3386 | 3392 | * Alloc a tag set to be associated with one or more request queues. |
3387 | 3393 | * May fail with EINVAL for various error conditions. May adjust the |
... | ... | @@ -3435,7 +3441,7 @@ |
3435 | 3441 | if (set->nr_maps == 1 && set->nr_hw_queues > nr_cpu_ids) |
3436 | 3442 | set->nr_hw_queues = nr_cpu_ids; |
3437 | 3443 | |
3438 | - if (blk_mq_realloc_tag_set_tags(set, 0, set->nr_hw_queues) < 0) | |
3444 | + if (blk_mq_alloc_tag_set_tags(set, set->nr_hw_queues) < 0) | |
3439 | 3445 | return -ENOMEM; |
3440 | 3446 | |
3441 | 3447 | ret = -ENOMEM; |