diff options
author | Christoph Hellwig <hch@lst.de> | 2022-04-20 06:27:15 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-05-02 22:06:20 +0200 |
commit | dec223c92a4688f6c9642d640cfe15a99d289dd4 (patch) | |
tree | ee13aaf118cd8a274d477a144fb9aed2ed33a8df /block/blk-cgroup.c | |
parent | blk-cgroup: move blkcg_{pin,unpin}_online out of line (diff) | |
download | linux-dec223c92a4688f6c9642d640cfe15a99d289dd4.tar.xz linux-dec223c92a4688f6c9642d640cfe15a99d289dd4.zip |
blk-cgroup: move struct blkcg to block/blk-cgroup.h
There is no real need to expose the blkcg structure to the whole kernel.
Move it to the private header an expose a helper to let the writeback
code access the cgwb_list member.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Tejun Heo <tj@kernel.org>
Link: https://lore.kernel.org/r/20220420042723.1010598-8-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 3af0d4a61955..bb52797c02bd 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -1005,6 +1005,13 @@ static struct cftype blkcg_legacy_files[] = { { } /* terminate */ }; +#ifdef CONFIG_CGROUP_WRITEBACK +struct list_head *blkcg_get_cgwb_list(struct cgroup_subsys_state *css) +{ + return &css_to_blkcg(css)->cgwb_list; +} +#endif + /* * blkcg destruction is a three-stage process. * @@ -1112,7 +1119,7 @@ void blkcg_unpin_online(struct cgroup_subsys_state *blkcg_css) static void blkcg_css_offline(struct cgroup_subsys_state *css) { /* this prevents anyone from attaching or migrating to this blkcg */ - wb_blkcg_offline(css_to_blkcg(css)); + wb_blkcg_offline(css); /* put the base online pin allowing step 2 to be triggered */ blkcg_unpin_online(css); |