chiark / gitweb /
unit: skip default cgroup setup if we have no hierarchy to work on
authorLennart Poettering <lennart@poettering.net>
Wed, 13 Apr 2011 02:35:34 +0000 (04:35 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 13 Apr 2011 02:35:34 +0000 (04:35 +0200)
src/unit.c

index e19061c..f50477f 100644 (file)
@@ -1876,6 +1876,9 @@ int unit_add_default_cgroups(Unit *u) {
         /* Adds in the default cgroups, if they weren't specified
          * otherwise. */
 
+        if (!u->meta.manager->cgroup_hierarchy)
+                return 0;
+
         if ((r = unit_add_one_default_cgroup(u, NULL)) < 0)
                 return r;