summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-11-16 21:16:13 -0500
committerGitHub <noreply@github.com>2016-11-16 21:16:13 -0500
commit4a58145f0f06970cc93377e034a9e27b3c0283ad (patch)
tree5917ecbde63fb2082ff78d85ed73a227b0fdeb5f /src/core/unit.c
parentc4027307a29c6e234fd4f05b212b45ef72a47072 (diff)
parent7d992a6ede8034a36699c25c19f03e95476eedac (diff)
Merge pull request #4678 from poettering/gc-device
Automatically GC device jobs when there's no need to keep them in the job queue anymore. Implement systemctl list-jobs --before/--after. Allow systemd-run -p After/Before/Wants/Requires= ...
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index da9bb58a52..fbb21e4985 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -389,10 +389,8 @@ void unit_add_to_gc_queue(Unit *u) {
if (unit_check_gc(u))
return;
- LIST_PREPEND(gc_queue, u->manager->gc_queue, u);
+ LIST_PREPEND(gc_queue, u->manager->gc_unit_queue, u);
u->in_gc_queue = true;
-
- u->manager->n_in_gc_queue++;
}
void unit_add_to_dbus_queue(Unit *u) {
@@ -570,10 +568,8 @@ void unit_free(Unit *u) {
if (u->in_cleanup_queue)
LIST_REMOVE(cleanup_queue, u->manager->cleanup_queue, u);
- if (u->in_gc_queue) {
- LIST_REMOVE(gc_queue, u->manager->gc_queue, u);
- u->manager->n_in_gc_queue--;
- }
+ if (u->in_gc_queue)
+ LIST_REMOVE(gc_queue, u->manager->gc_unit_queue, u);
if (u->in_cgroup_queue)
LIST_REMOVE(cgroup_queue, u->manager->cgroup_queue, u);