From: Jens Axboe <axboe@kernel.dk>
To: Damien Le Moal <dlemoal@kernel.org>, linux-block@vger.kernel.org
Subject: Re: [PATCH] block: simplify blk_mq_finish_request()
Date: Tue, 24 Feb 2026 15:16:39 -0700 [thread overview]
Message-ID: <745ef6a2-758c-484e-ab12-9aa2d64ae5d7@kernel.dk> (raw)
In-Reply-To: <20260224215855.1709335-1-dlemoal@kernel.org>
On 2/24/26 2:58 PM, Damien Le Moal wrote:
> Remove the local q variable as it is not necessary. This also removes a
> useless pointer dereference when RQF_USE_SCHED is not set for a request.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
> block/blk-mq.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 9af8c3dec3f6..55a255750ad1 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -781,12 +781,10 @@ EXPORT_SYMBOL_GPL(blk_mq_alloc_request_hctx);
>
> static void blk_mq_finish_request(struct request *rq)
> {
> - struct request_queue *q = rq->q;
> -
> blk_zone_finish_request(rq);
>
> if (rq->rq_flags & RQF_USE_SCHED) {
> - q->elevator->type->ops.finish_request(rq);
> + rq->q->elevator->type->ops.finish_request(rq);
> /*
> * For postflush request that may need to be
> * completed twice, we should clear this flag
This will compile to the same code...
--
Jens Axboe
next prev parent reply other threads:[~2026-02-24 22:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 21:58 [PATCH] block: simplify blk_mq_finish_request() Damien Le Moal
2026-02-24 22:16 ` Jens Axboe [this message]
2026-02-24 22:30 ` Damien Le Moal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=745ef6a2-758c-484e-ab12-9aa2d64ae5d7@kernel.dk \
--to=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.