]> err.no Git - systemd/commitdiff
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 e19061c50469f3de2ff3d0e806b4d21a1004d7fd..f50477f878a47dd31ffb8eeb88473a5a18107b82 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;