blk-mq: Remove unnecessary validation before calling blk_mq_sched_completed_request()
diff mbox series

Message ID 969d0e9f637b2a0dbfb3d284abfbed6fc7665ea4.1593846855.git.baolin.wang7@gmail.com
State New
Headers show
Series
  • blk-mq: Remove unnecessary validation before calling blk_mq_sched_completed_request()
Related show

Commit Message

Baolin Wang July 4, 2020, 7:28 a.m. UTC
We've already validated the 'q->elevator' before calling ->ops.completed_request()
in blk_mq_sched_completed_request(), thus no need to validate rq->internal_tag again,
and remove it.

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
---
 block/blk-mq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Baolin Wang July 10, 2020, 8:23 a.m. UTC | #1
Hi,

On Sat, Jul 04, 2020 at 03:28:21PM +0800, Baolin Wang wrote:
> We've already validated the 'q->elevator' before calling ->ops.completed_request()
> in blk_mq_sched_completed_request(), thus no need to validate rq->internal_tag again,
> and remove it.

A gentle ping?

> 
> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
> ---
>  block/blk-mq.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index abcf590f6238..78572b2e1675 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -550,8 +550,7 @@ inline void __blk_mq_end_request(struct request *rq, blk_status_t error)
>  		blk_stat_add(rq, now);
>  	}
>  
> -	if (rq->internal_tag != BLK_MQ_NO_TAG)
> -		blk_mq_sched_completed_request(rq, now);
> +	blk_mq_sched_completed_request(rq, now);
>  
>  	blk_account_io_done(rq, now);
>  
> -- 
> 2.17.1
Ming Lei July 10, 2020, 9:47 a.m. UTC | #2
On Fri, Jul 10, 2020 at 04:23:04PM +0800, Baolin Wang wrote:
> Hi,
> 
> On Sat, Jul 04, 2020 at 03:28:21PM +0800, Baolin Wang wrote:
> > We've already validated the 'q->elevator' before calling ->ops.completed_request()
> > in blk_mq_sched_completed_request(), thus no need to validate rq->internal_tag again,
> > and remove it.
> 
> A gentle ping?

Reviewed-by: Ming Lei <ming.lei@redhat.com>
Jens Axboe July 10, 2020, 2 p.m. UTC | #3
On 7/4/20 1:28 AM, Baolin Wang wrote:
> We've already validated the 'q->elevator' before calling ->ops.completed_request()
> in blk_mq_sched_completed_request(), thus no need to validate rq->internal_tag again,
> and remove it.

Applied, but I reformatted and edited your commit message.

Patch
diff mbox series

diff --git a/block/blk-mq.c b/block/blk-mq.c
index abcf590f6238..78572b2e1675 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -550,8 +550,7 @@  inline void __blk_mq_end_request(struct request *rq, blk_status_t error)
 		blk_stat_add(rq, now);
 	}
 
-	if (rq->internal_tag != BLK_MQ_NO_TAG)
-		blk_mq_sched_completed_request(rq, now);
+	blk_mq_sched_completed_request(rq, now);
 
 	blk_account_io_done(rq, now);