* [PATCH v2] block/mq-deadline: Remove the redundant rb_entry_rq in the deadline_from_pos().
@ 2025-08-29 3:45 chengkaitao
2025-08-29 4:32 ` Bart Van Assche
2025-08-29 6:16 ` Li Nan
0 siblings, 2 replies; 3+ messages in thread
From: chengkaitao @ 2025-08-29 3:45 UTC (permalink / raw)
To: axboe; +Cc: linux-block, linux-kernel, chengkaitao
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>
---
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)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] block/mq-deadline: Remove the redundant rb_entry_rq in the deadline_from_pos().
2025-08-29 3:45 [PATCH v2] block/mq-deadline: Remove the redundant rb_entry_rq in the deadline_from_pos() chengkaitao
@ 2025-08-29 4:32 ` Bart Van Assche
2025-08-29 6:16 ` Li Nan
1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2025-08-29 4:32 UTC (permalink / raw)
To: chengkaitao, axboe; +Cc: linux-block, linux-kernel, chengkaitao
On 8/28/25 8:45 PM, 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.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] block/mq-deadline: Remove the redundant rb_entry_rq in the deadline_from_pos().
2025-08-29 3:45 [PATCH v2] block/mq-deadline: Remove the redundant rb_entry_rq in the deadline_from_pos() chengkaitao
2025-08-29 4:32 ` Bart Van Assche
@ 2025-08-29 6:16 ` Li Nan
1 sibling, 0 replies; 3+ messages in thread
From: Li Nan @ 2025-08-29 6:16 UTC (permalink / raw)
To: chengkaitao, axboe; +Cc: linux-block, linux-kernel, chengkaitao
在 2025/8/29 11:45, chengkaitao 写道:
> 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>
> ---
> 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) {
LGTM
Reviewed-by: Li Nan <linan122@huawei.com>
--
Thanks,
Nan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-08-29 6:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-29 3:45 [PATCH v2] block/mq-deadline: Remove the redundant rb_entry_rq in the deadline_from_pos() chengkaitao
2025-08-29 4:32 ` Bart Van Assche
2025-08-29 6:16 ` Li Nan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).