diff mbox series

[RESEND,v4,5/6] block: rename __blk_mq_alloc_rq_map

Message ID f39d442afa7e37bf144954f3f65a1c46a6b6fa91.1588080449.git.zhangweiping@didiglobal.com (mailing list archive)
State New, archived
Headers show
Series Fix potential kernel panic when increase hardware queue | expand

Commit Message

Weiping Zhang April 28, 2020, 1:30 p.m. UTC
rename __blk_mq_alloc_rq_map to __blk_mq_alloc_map_and_request,
actually it alloc both map and request, make function name
align with function.

Signed-off-by: Weiping Zhang <zhangweiping@didiglobal.com>
---
 block/blk-mq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Ming Lei May 3, 2020, 3:36 a.m. UTC | #1
On Tue, Apr 28, 2020 at 09:30:13PM +0800, Weiping Zhang wrote:
> rename __blk_mq_alloc_rq_map to __blk_mq_alloc_map_and_request,
> actually it alloc both map and request, make function name
> align with function.
> 
> Signed-off-by: Weiping Zhang <zhangweiping@didiglobal.com>
> ---
>  block/blk-mq.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 1c360b69155c..b6c907dbbb30 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -2473,7 +2473,7 @@ static void blk_mq_init_cpu_queues(struct request_queue *q,
>  	}
>  }
>  
> -static bool __blk_mq_alloc_rq_map(struct blk_mq_tag_set *set, int hctx_idx)
> +static bool __blk_mq_alloc_map_and_request(struct blk_mq_tag_set *set, int hctx_idx)
>  {
>  	int ret = 0;
>  
> @@ -2527,7 +2527,7 @@ static void blk_mq_map_swqueue(struct request_queue *q)
>  		hctx_idx = set->map[HCTX_TYPE_DEFAULT].mq_map[i];
>  		/* unmapped hw queue can be remapped after CPU topo changed */
>  		if (!set->tags[hctx_idx] &&
> -		    !__blk_mq_alloc_rq_map(set, hctx_idx)) {
> +		    !__blk_mq_alloc_map_and_request(set, hctx_idx)) {
>  			/*
>  			 * If tags initialization fail for some hctx,
>  			 * that hctx won't be brought online.  In this
> @@ -3000,7 +3000,7 @@ static int blk_mq_realloc_map_and_requests(struct blk_mq_tag_set *set, int new)
>  		return 0;
>  
>  	for (i = now; i < new; i++)
> -		if (!__blk_mq_alloc_rq_map(set, i))
> +		if (!__blk_mq_alloc_map_and_request(set, i))
>  			goto out_unwind;
>  
>  	return 0;
> -- 
> 2.18.1
> 

Reviewed-by: Ming Lei <ming.lei@redhat.com>
diff mbox series

Patch

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 1c360b69155c..b6c907dbbb30 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2473,7 +2473,7 @@  static void blk_mq_init_cpu_queues(struct request_queue *q,
 	}
 }
 
-static bool __blk_mq_alloc_rq_map(struct blk_mq_tag_set *set, int hctx_idx)
+static bool __blk_mq_alloc_map_and_request(struct blk_mq_tag_set *set, int hctx_idx)
 {
 	int ret = 0;
 
@@ -2527,7 +2527,7 @@  static void blk_mq_map_swqueue(struct request_queue *q)
 		hctx_idx = set->map[HCTX_TYPE_DEFAULT].mq_map[i];
 		/* unmapped hw queue can be remapped after CPU topo changed */
 		if (!set->tags[hctx_idx] &&
-		    !__blk_mq_alloc_rq_map(set, hctx_idx)) {
+		    !__blk_mq_alloc_map_and_request(set, hctx_idx)) {
 			/*
 			 * If tags initialization fail for some hctx,
 			 * that hctx won't be brought online.  In this
@@ -3000,7 +3000,7 @@  static int blk_mq_realloc_map_and_requests(struct blk_mq_tag_set *set, int new)
 		return 0;
 
 	for (i = now; i < new; i++)
-		if (!__blk_mq_alloc_rq_map(set, i))
+		if (!__blk_mq_alloc_map_and_request(set, i))
 			goto out_unwind;
 
 	return 0;