summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-11-15 19:23:29 +0100
committerLennart Poettering <lennart@poettering.net>2016-11-16 15:03:26 +0100
commita2d72e265aaf0cceb0eb16d7f76730054e7ff439 (patch)
tree252d8b73633dd9fda6897795bfdb37345465bf7b
parent0a23a627296841a299e95118313eddb4d2e07e04 (diff)
core: drop n_in_gc_queue field of Manager structure
We count the units in the GC queue with this, but actually never make use of it, hence drop it.
-rw-r--r--src/core/manager.c2
-rw-r--r--src/core/manager.h1
-rw-r--r--src/core/unit.c6
3 files changed, 1 insertions, 8 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 52174eac07..dc81af9492 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -1015,8 +1015,6 @@ static unsigned manager_dispatch_gc_queue(Manager *m) {
}
}
- m->n_in_gc_queue = 0;
-
return n;
}
diff --git a/src/core/manager.h b/src/core/manager.h
index 35172fdba9..aa3f95e8e0 100644
--- a/src/core/manager.h
+++ b/src/core/manager.h
@@ -229,7 +229,6 @@ struct Manager {
int pin_cgroupfs_fd;
int gc_marker;
- unsigned n_in_gc_queue;
/* Flags */
ManagerExitCode exit_code:5;
diff --git a/src/core/unit.c b/src/core/unit.c
index da9bb58a52..df60a5bf04 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -391,8 +391,6 @@ void unit_add_to_gc_queue(Unit *u) {
LIST_PREPEND(gc_queue, u->manager->gc_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) {
+ if (u->in_gc_queue)
LIST_REMOVE(gc_queue, u->manager->gc_queue, u);
- u->manager->n_in_gc_queue--;
- }
if (u->in_cgroup_queue)
LIST_REMOVE(cgroup_queue, u->manager->cgroup_queue, u);