]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cgroup: when checking for legacy controllers, ignore any we don't care about
authorDan Streetman <ddstreet@canonical.com>
Wed, 13 Oct 2021 11:43:14 +0000 (07:43 -0400)
committerLennart Poettering <lennart@poettering.net>
Thu, 14 Oct 2021 12:57:49 +0000 (14:57 +0200)
src/shared/cgroup-setup.c

index aa5ee99ebfa3c98d099b07e1045f7294cb921075..2221fd07c2894a511b0518d9352cfebe317664a3 100644 (file)
@@ -63,6 +63,10 @@ static int cg_any_controller_used_for_v1(void) {
                 if (streq(enabled, "0"))
                         continue;
 
+                /* Ignore controllers we don't care about. */
+                if (cgroup_controller_from_string(name) < 0)
+                        continue;
+
                 /* Since the unified cgroup doesn't use multiple hierarchies, if any controller has a
                  * non-zero hierarchy_id that means it's in use already in a legacy (or hybrid) cgroup v1
                  * hierarchy, and can't be used in a unified cgroup. */