]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/service.c
core: introduce MANAGER_IS_RELOADING() macro
[thirdparty/systemd.git] / src / core / service.c
index 7aea6f7ff4106a56163d072e88f3e7865c24e74a..58084e2f82be5588f9984d608e4ac621862e1c60 100644 (file)
@@ -920,7 +920,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)
+        if (state == SERVICE_EXITED && !MANAGER_IS_RELOADING(UNIT(s)->manager))
                 unit_prune_cgroup(UNIT(s));
 
         /* For remain_after_exit services, let's see if we can "release" the