summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Down <chris@chrisdown.name>2019-04-03 14:53:59 +0100
committerChris Down <chris@chrisdown.name>2019-04-03 14:53:59 +0100
commit028fc7912421966e18208092694adaf317446a81 (patch)
treea1cb25d504f1348b109b412ec702d2994c1d2009
parent03d980dbd0b46d6b3f7010eed8b7fc2519e7a1e5 (diff)
downloadsystemd-028fc7912421966e18208092694adaf317446a81.tar.gz
make defaultmemorylow only affect subtree
-rw-r--r--src/core/cgroup.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 4524edc140..c672d32c2f 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -390,9 +390,8 @@ static uint64_t unit_get_ancestor_memory_low(Unit *u) {
CGroupContext *c;
/* 1. Is MemoryLow set in this unit? If so, use that.
- * 2. Is DefaultMemoryLow set in this unit? If so, use that.
- * 3. Is DefaultMemoryLow set in any ancestor? If so, use that.
- * 4. Otherwise, return CGROUP_LIMIT_MIN. */
+ * 2. Is DefaultMemoryLow set in any ancestor? If so, use that.
+ * 3. Otherwise, return CGROUP_LIMIT_MIN. */
assert(u);
@@ -401,9 +400,6 @@ static uint64_t unit_get_ancestor_memory_low(Unit *u) {
if (c->memory_low != CGROUP_LIMIT_INVALID)
return c->memory_low;
- if (c->default_memory_low != CGROUP_LIMIT_INVALID)
- return c->default_memory_low;
-
while (UNIT_ISSET(u->slice)) {
u = UNIT_DEREF(u->slice);
c = unit_get_cgroup_context(u);