Skip to content

Commit 312ccd4

Browse files
bvanasscheaxboe
authored andcommitted
blk-mq: Clean up blk_mq_requeue_work()
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 <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Nitesh Shetty <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent e01424f commit 312ccd4

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

block/blk-mq.c

+4-6
Original file line numberDiff line numberDiff line change
@@ -1544,19 +1544,17 @@ static void blk_mq_requeue_work(struct work_struct *work)
15441544

15451545
while (!list_empty(&rq_list)) {
15461546
rq = list_entry(rq_list.next, struct request, queuelist);
1547+
list_del_init(&rq->queuelist);
15471548
/*
1548-
* If RQF_DONTPREP ist set, the request has been started by the
1549+
* If RQF_DONTPREP is set, the request has been started by the
15491550
* driver already and might have driver-specific data allocated
15501551
* already. Insert it into the hctx dispatch list to avoid
15511552
* block layer merges for the request.
15521553
*/
1553-
if (rq->rq_flags & RQF_DONTPREP) {
1554-
list_del_init(&rq->queuelist);
1554+
if (rq->rq_flags & RQF_DONTPREP)
15551555
blk_mq_request_bypass_insert(rq, 0);
1556-
} else {
1557-
list_del_init(&rq->queuelist);
1556+
else
15581557
blk_mq_insert_request(rq, BLK_MQ_INSERT_AT_HEAD);
1559-
}
15601558
}
15611559

15621560
while (!list_empty(&flush_list)) {

0 commit comments

Comments
 (0)