1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 18:27:04 +03:00

cgroup: fix inverted condition

A bug was introduced in acb14d3 "cgroup: when getting cgroup empty
notifications, always search up the tree".

When the given cgroup is found the hashmap, we should be happy and
return it, not go looking up the tree for another one.

Fixes the hanging NetworkManager on shutdown for me.
This commit is contained in:
Michal Schmidt 2012-02-10 02:53:10 +01:00
parent 1b73da108b
commit 5c72face73

View File

@ -364,7 +364,7 @@ int cgroup_bonding_get(Manager *m, const char *cgroup, CGroupBonding **bonding)
assert(bonding);
b = hashmap_get(m->cgroup_bondings, cgroup);
if (!b) {
if (b) {
*bonding = b;
return 1;
}