core: generalize the cgroup empty check on GC
authorLennart Poettering <lennart@poettering.net>
Fri, 24 Nov 2017 19:27:01 +0000 (20:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Sat, 25 Nov 2017 16:08:21 +0000 (17:08 +0100)
commite98b2fbbe9b48669f04e0e01eadf668be388fef4
treec1f0640f93fba9d6b5966016d332bf21535bf3c7
parente9a4f67609cfabfeccbda8565bc4daf5b9e45c54
core: generalize the cgroup empty check on GC

Let's move the cgroup empty check for all unit types into the generic
unit_check_gc() call, out of the per-unit-type _check_gc() type. This
not only allows us to share some code, but also hooks up mount and
socket units with this kind of check, for free, as it was missing there
previously.
src/core/scope.c
src/core/service.c
src/core/unit.c