chiark / gitweb /
core: rename unit_destroy_cgroup() to unit_destroy_cgroup_if_empty() since it's not...
authorLennart Poettering <lennart@poettering.net>
Tue, 9 Dec 2014 01:31:42 +0000 (02:31 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 9 Dec 2014 01:31:42 +0000 (02:31 +0100)
src/core/cgroup.c
src/core/cgroup.h
src/core/service.c
src/core/unit.c

index af048354e1fa71d23fde70783150183bf45c69f3..6815ca907ac5a41f331771c9a39d603aaa158882 100644 (file)
@@ -782,7 +782,7 @@ int unit_realize_cgroup(Unit *u) {
         return unit_realize_cgroup_now(u, manager_state(u->manager));
 }
 
-void unit_destroy_cgroup(Unit *u) {
+void unit_destroy_cgroup_if_empty(Unit *u) {
         int r;
 
         assert(u);
@@ -802,7 +802,6 @@ void unit_destroy_cgroup(Unit *u) {
         u->cgroup_path = NULL;
         u->cgroup_realized = false;
         u->cgroup_realized_mask = 0;
-
 }
 
 pid_t unit_search_main_pid(Unit *u) {
index 3c43885bf28fce6b6d9ea57f942f5d4b032e1e40..16d661357b216e962b85afb7bdbd664d16ac6340 100644 (file)
@@ -109,7 +109,7 @@ CGroupControllerMask unit_get_target_mask(Unit *u);
 
 void unit_update_cgroup_members_masks(Unit *u);
 int unit_realize_cgroup(Unit *u);
-void unit_destroy_cgroup(Unit *u);
+void unit_destroy_cgroup_if_empty(Unit *u);
 
 int manager_setup_cgroup(Manager *m);
 void manager_shutdown_cgroup(Manager *m, bool delete);
index 53a2935e52d04bd4d6857def6c79e6278b82229b..bfbe959edbbc7f81a6ac64b0ea51e6b1678c0ff6 100644 (file)
@@ -703,7 +703,7 @@ static void service_set_state(Service *s, ServiceState state) {
         /* For the inactive states unit_notify() will trim the cgroup,
          * but for exit we have to do that ourselves... */
         if (state == SERVICE_EXITED && UNIT(s)->manager->n_reloading <= 0)
-                unit_destroy_cgroup(UNIT(s));
+                unit_destroy_cgroup_if_empty(UNIT(s));
 
         /* For remain_after_exit services, let's see if we can "release" the
          * hold on the console, since unit_notify() only does that in case of
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