From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Bart Van Assche <bvanassche@acm.org>,
Damien Le Moal <dlemoal@kernel.org>
Subject: [PATCH 2/3] blk-mq: Clean up blk_mq_requeue_work()
Date: Thu, 12 Dec 2024 13:29:40 -0800 [thread overview]
Message-ID: <20241212212941.1268662-3-bvanassche@acm.org> (raw)
In-Reply-To: <20241212212941.1268662-1-bvanassche@acm.org>
Move a statement that occurs in both branches of an if-statement in front
of the if-statement. Fix a typo in a source code comment. No functionality
has been changed.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/blk-mq.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index a6ab1757a21a..68dbac660256 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -1535,19 +1535,17 @@ static void blk_mq_requeue_work(struct work_struct *work)
while (!list_empty(&rq_list)) {
rq = list_entry(rq_list.next, struct request, queuelist);
+ list_del_init(&rq->queuelist);
/*
- * If RQF_DONTPREP ist set, the request has been started by the
+ * If RQF_DONTPREP is set, the request has been started by the
* driver already and might have driver-specific data allocated
* already. Insert it into the hctx dispatch list to avoid
* block layer merges for the request.
*/
- if (rq->rq_flags & RQF_DONTPREP) {
- list_del_init(&rq->queuelist);
+ if (rq->rq_flags & RQF_DONTPREP)
blk_mq_request_bypass_insert(rq, 0);
- } else {
- list_del_init(&rq->queuelist);
+ else
blk_mq_insert_request(rq, BLK_MQ_INSERT_AT_HEAD);
- }
}
while (!list_empty(&flush_list)) {
next prev parent reply other threads:[~2024-12-12 21:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-12 21:29 [PATCH 0/3] Three small block layer patches Bart Van Assche
2024-12-12 21:29 ` [PATCH 1/3] mq-deadline: Remove a local variable Bart Van Assche
2024-12-13 4:44 ` Christoph Hellwig
2024-12-13 5:36 ` Nitesh Shetty
2024-12-13 7:26 ` Johannes Thumshirn
2024-12-12 21:29 ` Bart Van Assche [this message]
2024-12-13 4:44 ` [PATCH 2/3] blk-mq: Clean up blk_mq_requeue_work() Christoph Hellwig
2024-12-13 5:34 ` Nitesh Shetty
2024-12-13 7:26 ` Johannes Thumshirn
2024-12-12 21:29 ` [PATCH 3/3] block: Fix queue_iostats_passthrough_show() Bart Van Assche
2024-12-13 4:46 ` Christoph Hellwig
2024-12-13 16:26 ` Bart Van Assche
2024-12-16 15:56 ` Christoph Hellwig
2024-12-13 15:09 ` [PATCH 0/3] Three small block layer patches Jens Axboe
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=20241212212941.1268662-3-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=hch@lst.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox