]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core: drop n_in_gc_queue field of Manager structure
authorLennart Poettering <lennart@poettering.net>
Tue, 15 Nov 2016 18:23:29 +0000 (19:23 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 16 Nov 2016 14:03:26 +0000 (15:03 +0100)
We count the units in the GC queue with this, but actually never make use of
it, hence drop it.

src/core/manager.c
src/core/manager.h
src/core/unit.c

index 52174eac07d7da197f28a8cfad853b9c18f51a0b..dc81af949229e26944d9c0e36263c65ad3c9ca85 100644 (file)
@@ -1015,8 +1015,6 @@ static unsigned manager_dispatch_gc_queue(Manager *m) {
                 }
         }
 
-        m->n_in_gc_queue = 0;
-
         return n;
 }
 
index 35172fdba9886d6bee05f98fe0b35a84c6091be2..aa3f95e8e084de24d3e4dab8b390600e1acc4a21 100644 (file)
@@ -229,7 +229,6 @@ struct Manager {
         int pin_cgroupfs_fd;
 
         int gc_marker;
-        unsigned n_in_gc_queue;
 
         /* Flags */
         ManagerExitCode exit_code:5;
index da9bb58a5210e78dde6f5ddb59e14e3c0b38371c..df60a5bf04f5cb54eca4258506ad2d2657837564 100644 (file)
@@ -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);