diff mbox series

blk-mq: cleanup redundant nr_hw_queues assignement

Message ID 20210416075318.19976-1-jefflexu@linux.alibaba.com (mailing list archive)
State New
Headers show
Series blk-mq: cleanup redundant nr_hw_queues assignement | expand

Commit Message

JeffleXu April 16, 2021, 7:53 a.m. UTC
'set->nr_hw_queues' has already been assigneid to nr_hw_queues in
blk_mq_realloc_tag_set_tags().

Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
---
 block/blk-mq.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Jens Axboe April 16, 2021, 12:12 p.m. UTC | #1
On 4/16/21 1:53 AM, Jeffle Xu wrote:
> 'set->nr_hw_queues' has already been assigneid to nr_hw_queues in
> blk_mq_realloc_tag_set_tags().
> 
> Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
> ---
>  block/blk-mq.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 55ef6b975169..c7d1613e7514 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -3672,7 +3672,6 @@ static void __blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set,
>  	    0)
>  		goto reregister;
>  
> -	set->nr_hw_queues = nr_hw_queues;

This isn't an equivalent transformation if nr_hw_queues >
set->nr_hw_queues.
diff mbox series

Patch

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 55ef6b975169..c7d1613e7514 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -3672,7 +3672,6 @@  static void __blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set,
 	    0)
 		goto reregister;
 
-	set->nr_hw_queues = nr_hw_queues;
 fallback:
 	blk_mq_update_queue_map(set);
 	list_for_each_entry(q, &set->tag_list, tag_set_list) {