]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cgroup: Expose some cgroup helpers
authorTejun Heo <tj@kernel.org>
Wed, 4 Mar 2026 21:26:47 +0000 (11:26 -1000)
committerTejun Heo <tj@kernel.org>
Fri, 6 Mar 2026 04:15:58 +0000 (18:15 -1000)
commit5b30afc20b3fea29b9beb83c6415c4ff06f774aa
tree2e3f653218ab5d5fa7380e848fff2f1d7d98cbb5
parent5ee8dbf54602dc340d6235b1d6aa17c0f283f48c
cgroup: Expose some cgroup helpers

Expose the following through cgroup.h:

- cgroup_on_dfl()
- cgroup_is_dead()
- cgroup_for_each_live_child()
- cgroup_for_each_live_descendant_pre()
- cgroup_for_each_live_descendant_post()

Until now, these didn't need to be exposed because controllers only cared
about the css hierarchy. The planned sched_ext hierarchical scheduler
support will be based on the default cgroup hierarchy, which is in line
with the existing BPF cgroup support, and thus needs these exposed.

Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/cgroup.h
kernel/cgroup/cgroup-internal.h
kernel/cgroup/cgroup.c