[systemd-commits] src/cgroup.c

Michal Schmidt michich at kemper.freedesktop.org
Thu Feb 9 17:57:53 PST 2012


 src/cgroup.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5c72face73e89610a5b926c42fc8e0223bf546a2
Author: Michal Schmidt <mschmidt at redhat.com>
Date:   Fri Feb 10 02:53:10 2012 +0100

    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.

diff --git a/src/cgroup.c b/src/cgroup.c
index 182dd59..1f6139e 100644
--- a/src/cgroup.c
+++ b/src/cgroup.c
@@ -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;
         }



More information about the systemd-commits mailing list