diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-10-05 10:28:22 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-10-05 11:11:04 +0200 |
commit | bd1791b597e9e43cfc55441d67952854f68c3d4b (patch) | |
tree | a47236a4e0117480922990d00cddc595e69fee85 /src/shared/cgroup-setup.c | |
parent | sd-boot: introduce and use efivar_unset() (diff) | |
download | systemd-bd1791b597e9e43cfc55441d67952854f68c3d4b.tar.xz systemd-bd1791b597e9e43cfc55441d67952854f68c3d4b.zip |
cgroup-util: drop "controller" argument from various cgroup helper calls
systemd's own cgroup hierarchy is special to us, we use it to actually
manage processes. Because of that many calls tha apply to cgroups are
only ever called with the SYSTEMD_CGROUP_CONTROLLER as controller
argument. Let's hence remove the argument altogether.
This in particular touches the kill and xattr routines.
This changes no behaviour, we just drop an argument that is always set
to the same value anyway.
This is preparation to eventually getting rid of the cgroupvs1, because
on cgroupvs2 the cgroup paths do not change for different controllers,
there's only a single hierarchy there.
Diffstat (limited to 'src/shared/cgroup-setup.c')
-rw-r--r-- | src/shared/cgroup-setup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c index c35fd460bd..fac2e08afc 100644 --- a/src/shared/cgroup-setup.c +++ b/src/shared/cgroup-setup.c @@ -352,7 +352,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { xsprintf(c, PID_FMT "\n", pid); r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER); - if (r == -EOPNOTSUPP && cg_is_threaded(controller, path) > 0) + if (r == -EOPNOTSUPP && cg_is_threaded(path) > 0) /* When the threaded mode is used, we cannot read/write the file. Let's return recognizable error. */ return -EUCLEAN; if (r < 0) |