diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-04-20 03:53:12 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-04-20 03:53:12 +0200 |
commit | 38c52d4606c77ff2b2b60a08f663a1983d8254b0 (patch) | |
tree | 694361c7bb0e242e73c0ef9014624ea5ac6da19d /src/cgroup.c | |
parent | 9534ce54858c67363b841cdbdc315140437bfdb4 (diff) |
cgroup: don't accidentaly trim on reload
https://bugzilla.redhat.com/show_bug.cgi?id=678555
Diffstat (limited to 'src/cgroup.c')
-rw-r--r-- | src/cgroup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cgroup.c b/src/cgroup.c index ca19a4fd47..0c6f20d4b7 100644 --- a/src/cgroup.c +++ b/src/cgroup.c @@ -63,7 +63,7 @@ int cgroup_bonding_realize_list(CGroupBonding *first) { return 0; } -void cgroup_bonding_free(CGroupBonding *b) { +void cgroup_bonding_free(CGroupBonding *b, bool remove_or_trim) { assert(b); if (b->unit) { @@ -82,7 +82,7 @@ void cgroup_bonding_free(CGroupBonding *b) { } } - if (b->realized && b->ours) { + if (b->realized && b->ours && remove_or_trim) { if (cgroup_bonding_is_empty(b) > 0) cg_delete(b->controller, b->path); @@ -95,11 +95,11 @@ void cgroup_bonding_free(CGroupBonding *b) { free(b); } -void cgroup_bonding_free_list(CGroupBonding *first) { +void cgroup_bonding_free_list(CGroupBonding *first, bool remove_or_trim) { CGroupBonding *b, *n; LIST_FOREACH_SAFE(by_unit, b, n, first) - cgroup_bonding_free(b); + cgroup_bonding_free(b, remove_or_trim); } void cgroup_bonding_trim(CGroupBonding *b, bool delete_root) { |