cgroup: Make realize_queue behave FIFO

The current implementation is LIFO, which is a) confusing b) prevents
some ordered operations on the cgroup tree (e.g. removing children
before parents).

Fix it quickly. Current list implementation turns this from O(1) to O(n)
operation. Rework the lists later.
This commit is contained in:
Michal Koutný
2020-07-28 15:49:24 +02:00
parent 31363bd564
commit a479c21ed2
+1 -1
View File
@@ -2112,7 +2112,7 @@ void unit_add_to_cgroup_realize_queue(Unit *u) {
if (u->in_cgroup_realize_queue)
return;
LIST_PREPEND(cgroup_realize_queue, u->manager->cgroup_realize_queue, u);
LIST_APPEND(cgroup_realize_queue, u->manager->cgroup_realize_queue, u);
u->in_cgroup_realize_queue = true;
}