[PATCH 18/20] block, bfq: remove unnecessary bfqq->next_rq = NULL in bfq_remove_request

From: Kemeng Shi
Date: Tue Nov 01 2022 - 05:35:39 EST


bfqq->next_rq is properly assigned at beginning of bfq_remove_request
for condition that bfq_queue will be empty as bfqq->next_rq will be
NULL only if bfqq->next_rq is removed and bfqq->next_rq is the last
request existing are both met.

Signed-off-by: Kemeng Shi <shikemeng@xxxxxxxxxx>
---
block/bfq-iosched.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 0864254b8dcd..d3f4d995f84a 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -2410,8 +2410,6 @@ static void bfq_remove_request(struct request_queue *q,
q->last_merge = NULL;

if (RB_EMPTY_ROOT(&bfqq->sort_list)) {
- bfqq->next_rq = NULL;
-
if (bfq_bfqq_busy(bfqq) && bfqq != bfqd->in_service_queue) {
bfq_del_bfqq_busy(bfqq, false);
/*
@@ -2445,7 +2443,6 @@ static void bfq_remove_request(struct request_queue *q,

if (rq->cmd_flags & REQ_META)
bfqq->meta_pending--;
-
}

static bool bfq_bio_merge(struct request_queue *q, struct bio *bio,
--
2.30.0