diff options
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) { |