unit: skip default cgroup setup if we have no hierarchy to work on

This commit is contained in:
Lennart Poettering 2011-04-13 04:35:34 +02:00
parent 090bf7cbc4
commit df18d8c895

View 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;