From: Lennart Poettering Date: Wed, 13 Apr 2011 02:35:34 +0000 (+0200) Subject: unit: skip default cgroup setup if we have no hierarchy to work on X-Git-Tag: v25~58 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=df18d8c8959bbd9d7b866c6946aa856e462a06b3 unit: skip default cgroup setup if we have no hierarchy to work on --- diff --git a/src/unit.c b/src/unit.c index e19061c50..f50477f87 100644 --- a/src/unit.c +++ b/src/unit.c @@ -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;