chiark / gitweb /
core: rename unit_destroy_cgroup() to unit_destroy_cgroup_if_empty() since it's not...
[elogind.git] / src / core / unit.c
index 7daf170e29416245046c299f77d2ef99503259c2..43280ecd2f59a8d85afdd4fd33f214b7d79964c5 100644 (file)
@@ -1783,7 +1783,7 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su
 
         /* Make sure the cgroup is always removed when we become inactive */
         if (UNIT_IS_INACTIVE_OR_FAILED(ns))
-                unit_destroy_cgroup(u);
+                unit_destroy_cgroup_if_empty(u);
 
         /* Note that this doesn't apply to RemainAfterExit services exiting
          * successfully, since there's no change of state in that case. Which is