cgroup-setup: drop unnecessary controller argument

This also removes unnecessary cg_{create,attach,trim}_everywhere(),
and rename cg_enable_everywhere() -> cg_enable().
This commit is contained in:
Yu Watanabe
2025-04-16 03:56:04 +09:00
parent c35a585763
commit 188286eec6
13 changed files with 63 additions and 95 deletions
+1 -1
View File
@@ -5405,7 +5405,7 @@ int unit_fork_helper_process(Unit *u, const char *name, bool into_cgroup, PidRef
(void) ignore_signals(SIGPIPE);
if (crt && crt->cgroup_path) {
r = cg_attach_everywhere(u->manager->cgroup_supported, crt->cgroup_path, 0);
r = cg_attach(crt->cgroup_path, 0);
if (r < 0) {
log_unit_error_errno(u, r, "Failed to join unit cgroup %s: %m", empty_to_root(crt->cgroup_path));
_exit(EXIT_CGROUP);