Michal Schmidt e43452
From b160c4add112ec90a811726ee3ac536f98cfd6cf Mon Sep 17 00:00:00 2001
Michal Schmidt e43452
From: Lennart Poettering <lennart@poettering.net>
Michal Schmidt e43452
Date: Tue, 1 Nov 2011 22:02:36 +0100
Michal Schmidt f1996e
Subject: [PATCH] cgroup: always recreate cgroup before we try to apply
Michal Schmidt f1996e
 attributes
Michal Schmidt e43452
Michal Schmidt e43452
We might have trimmed the cgroup tree previously, hence don't trust our
Michal Schmidt e43452
own "realized" flag, always recreate cgroup tree before applying our
Michal Schmidt e43452
attributes to make sure this actually works out.
Michal Schmidt e43452
Michal Schmidt e43452
https://bugzilla.redhat.com/show_bug.cgi?id=749687
Michal Schmidt e43452
(cherry picked from commit 6ddaf1ca4ab0e6a094f6d37fa1e0c604c6d867ba)
Michal Schmidt e43452
---
Michal Schmidt e43452
 src/cgroup.c |    3 ---
Michal Schmidt e43452
 1 files changed, 0 insertions(+), 3 deletions(-)
Michal Schmidt e43452
Michal Schmidt e43452
diff --git a/src/cgroup.c b/src/cgroup.c
Michal Schmidt e43452
index dcf2c2f..be837c3 100644
Michal Schmidt e43452
--- a/src/cgroup.c
Michal Schmidt e43452
+++ b/src/cgroup.c
Michal Schmidt e43452
@@ -38,9 +38,6 @@ int cgroup_bonding_realize(CGroupBonding *b) {
Michal Schmidt e43452
         assert(b->path);
Michal Schmidt e43452
         assert(b->controller);
Michal Schmidt e43452
 
Michal Schmidt e43452
-        if (b->realized)
Michal Schmidt e43452
-                return 0;
Michal Schmidt e43452
-
Michal Schmidt e43452
         r = cg_create(b->controller, b->path);
Michal Schmidt e43452
         if (r < 0) {
Michal Schmidt e43452
                 log_warning("Failed to create cgroup %s:%s: %s", b->controller, b->path, strerror(-r));