mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] blk-cgroup: remove unused blk_queue_for_each_rl stub
@ 2026-07-17 10:20 Tao Cui
  2026-07-23  6:47 ` yu kuai
  2026-07-23 11:17 ` Tang Yizhou
  0 siblings, 2 replies; 3+ messages in thread
From: Tao Cui @ 2026-07-17 10:20 UTC (permalink / raw)
  To: axboe
  Cc: linux-block, linux-kernel, cgroups, tj, yukuai, yangxiuwei,
	cui.tao, cuitao

From: Tao Cui <cuitao@kylinos.cn>

blk_queue_for_each_rl() was added by commit a051661ca6d1 ("blkcg:
implement per-blkg request allocation") to iterate over the root request
list and per-blkg request lists for the legacy (non-blk-mq) request
allocation path.  The request_list code, including q->root_rl from
struct request_queue, was later removed in 2018 by commit db6d99523560
("block: remove request_list code").

The macro definition left behind in the !CONFIG_BLK_CGROUP fallback
branch of the private block/blk-cgroup.h header now references the
removed q->root_rl field, and has no callers in-tree (it would fail to
compile if expanded, so it cannot have any out-of-tree users either).

Remove the dead stub.

Signed-off-by: Tao Cui <cuitao@kylinos.cn>
---
 block/blk-cgroup.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index 615390f751aa..6a309d2d3db5 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -500,9 +500,6 @@ static inline void blkg_put(struct blkcg_gq *blkg) { }
 static inline void blk_cgroup_bio_start(struct bio *bio) { }
 static inline bool blk_cgroup_mergeable(struct request *rq, struct bio *bio) { return true; }
 
-#define blk_queue_for_each_rl(rl, q)	\
-	for ((rl) = &(q)->root_rl; (rl); (rl) = NULL)
-
 #endif	/* CONFIG_BLK_CGROUP */
 
 #endif /* _BLK_CGROUP_PRIVATE_H */
-- 
2.43.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] blk-cgroup: remove unused blk_queue_for_each_rl stub
  2026-07-17 10:20 [PATCH] blk-cgroup: remove unused blk_queue_for_each_rl stub Tao Cui
@ 2026-07-23  6:47 ` yu kuai
  2026-07-23 11:17 ` Tang Yizhou
  1 sibling, 0 replies; 3+ messages in thread
From: yu kuai @ 2026-07-23  6:47 UTC (permalink / raw)
  To: Tao Cui, axboe, yu kuai
  Cc: linux-block, linux-kernel, cgroups, tj, yukuai, yangxiuwei, cuitao

在 2026/7/17 18:20, Tao Cui 写道:

> From: Tao Cui<cuitao@kylinos.cn>
>
> blk_queue_for_each_rl() was added by commit a051661ca6d1 ("blkcg:
> implement per-blkg request allocation") to iterate over the root request
> list and per-blkg request lists for the legacy (non-blk-mq) request
> allocation path.  The request_list code, including q->root_rl from
> struct request_queue, was later removed in 2018 by commit db6d99523560
> ("block: remove request_list code").
>
> The macro definition left behind in the !CONFIG_BLK_CGROUP fallback
> branch of the private block/blk-cgroup.h header now references the
> removed q->root_rl field, and has no callers in-tree (it would fail to
> compile if expanded, so it cannot have any out-of-tree users either).
>
> Remove the dead stub.
>
> Signed-off-by: Tao Cui<cuitao@kylinos.cn>
> ---
>   block/blk-cgroup.h | 3 ---
>   1 file changed, 3 deletions(-)
Reviewed-by: Yu Kuai <yukuai@fygo.io>

-- 
Thanks,
Kuai

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] blk-cgroup: remove unused blk_queue_for_each_rl stub
  2026-07-17 10:20 [PATCH] blk-cgroup: remove unused blk_queue_for_each_rl stub Tao Cui
  2026-07-23  6:47 ` yu kuai
@ 2026-07-23 11:17 ` Tang Yizhou
  1 sibling, 0 replies; 3+ messages in thread
From: Tang Yizhou @ 2026-07-23 11:17 UTC (permalink / raw)
  To: Tao Cui, axboe
  Cc: linux-block, linux-kernel, cgroups, tj, yukuai, yangxiuwei, cuitao


On 17/7/26 6:20 pm, Tao Cui wrote:
> From: Tao Cui <cuitao@kylinos.cn>
> 
> blk_queue_for_each_rl() was added by commit a051661ca6d1 ("blkcg:
> implement per-blkg request allocation") to iterate over the root request
> list and per-blkg request lists for the legacy (non-blk-mq) request
> allocation path.  The request_list code, including q->root_rl from
> struct request_queue, was later removed in 2018 by commit db6d99523560
> ("block: remove request_list code").
> 
> The macro definition left behind in the !CONFIG_BLK_CGROUP fallback
> branch of the private block/blk-cgroup.h header now references the
> removed q->root_rl field, and has no callers in-tree (it would fail to
> compile if expanded, so it cannot have any out-of-tree users either).
> 
> Remove the dead stub.
> 
> Signed-off-by: Tao Cui <cuitao@kylinos.cn>
> ---
>  block/blk-cgroup.h | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
> index 615390f751aa..6a309d2d3db5 100644
> --- a/block/blk-cgroup.h
> +++ b/block/blk-cgroup.h
> @@ -500,9 +500,6 @@ static inline void blkg_put(struct blkcg_gq *blkg) { }
>  static inline void blk_cgroup_bio_start(struct bio *bio) { }
>  static inline bool blk_cgroup_mergeable(struct request *rq, struct bio *bio) { return true; }
>  
> -#define blk_queue_for_each_rl(rl, q)	\
> -	for ((rl) = &(q)->root_rl; (rl); (rl) = NULL)
> -
>  #endif	/* CONFIG_BLK_CGROUP */
>  
>  #endif /* _BLK_CGROUP_PRIVATE_H */

Reviewed-by: Tang Yizhou <yizhou.tang@shopee.com>

-- 
Best Regards,
Yi


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-23 11:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-17 10:20 [PATCH] blk-cgroup: remove unused blk_queue_for_each_rl stub Tao Cui
2026-07-23  6:47 ` yu kuai
2026-07-23 11:17 ` Tang Yizhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®