[PATCH RESEND v2] block/mq-deadline: Remove the redundant rb_entry_rq in the deadline_from_pos().

chengkaitao posted 1 patch 2 weeks, 3 days ago
block/mq-deadline.c | 4 ----
1 file changed, 4 deletions(-)
[PATCH RESEND v2] block/mq-deadline: Remove the redundant rb_entry_rq in the deadline_from_pos().
Posted by chengkaitao 2 weeks, 3 days ago
From: chengkaitao <chengkaitao@kylinos.cn>

In commit(fde02699c242), the "if (blk_rq_is_seq_zoned_write(rq))"
was removed, but the "rb_entry_rq(node)" and some other code were
inadvertently left behind. This patch fixed it.

Signed-off-by: chengkaitao <chengkaitao@kylinos.cn>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Li Nan <linan122@huawei.com>
---
 block/mq-deadline.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index 1a031922c447..63145cc9825f 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -133,10 +133,6 @@ static inline struct request *deadline_from_pos(struct dd_per_prio *per_prio,
 	struct rb_node *node = per_prio->sort_list[data_dir].rb_node;
 	struct request *rq, *res = NULL;
 
-	if (!node)
-		return NULL;
-
-	rq = rb_entry_rq(node);
 	while (node) {
 		rq = rb_entry_rq(node);
 		if (blk_rq_pos(rq) >= pos) {
-- 
2.39.5 (Apple Git-154)
Re: [PATCH RESEND v2] block/mq-deadline: Remove the redundant rb_entry_rq in the deadline_from_pos().
Posted by Jens Axboe 2 weeks, 2 days ago
On Mon, 15 Sep 2025 20:33:07 +0800, chengkaitao wrote:
> In commit(fde02699c242), the "if (blk_rq_is_seq_zoned_write(rq))"
> was removed, but the "rb_entry_rq(node)" and some other code were
> inadvertently left behind. This patch fixed it.
> 
> 

Applied, thanks!

[1/1] block/mq-deadline: Remove the redundant rb_entry_rq in the deadline_from_pos().
      commit: 74b1db86847cce1c0fb54d362f8f5fde3adfd41b

Best regards,
-- 
Jens Axboe