Skip to contentSkip to conversation

block/mq-deadline: Remove the redundant rb_entry_rq in the deadline_from_pos().

PATCH RESEND Applied chengkaitao 2 participants 2 messages Sep 15, 2025 Block layer

lore
Share & tools
lore
#0 lore raw

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

From: chengkaitao <[email protected]>

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.

---
 block/mq-deadline.c | 4 ----
 1 file changed, 4 deletions(-)
block/mq-deadline.c +0 -4
index 1a031922c447..63145cc9825f 100644
@@ -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) {
Signature · 1 line
2.39.5 (Apple Git-154)
maintainer Applied
#1 lore raw
Quoted 5 lines · chengkaitao

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,

Signature · 1 line
Jens Axboe