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.
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;
}