From: Michal Koutný Date: Thu, 29 Sep 2022 11:34:21 +0000 (+0200) Subject: cgroup: Do not emit compat message without memory limit X-Git-Tag: v253-rc1~118 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7a41491ed8bbfdc4ef1f9fb467a184fd2f131d4;p=thirdparty%2Fsystemd.git cgroup: Do not emit compat message without memory limit Previously mere MemoryLow= directive would lead to emitting the compat message 'Applying MemoryMax=18446744073709551615 as MemoryLimit=' even though it carries little information. --- diff --git a/src/core/cgroup.c b/src/core/cgroup.c index e04b903d5c8..7f3782ae413 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -1651,7 +1651,8 @@ static void cgroup_context_apply( if (unit_has_unified_memory_config(u)) { val = c->memory_max; - log_cgroup_compat(u, "Applying MemoryMax=%" PRIu64 " as MemoryLimit=", val); + if (val != CGROUP_LIMIT_MAX) + log_cgroup_compat(u, "Applying MemoryMax=%" PRIu64 " as MemoryLimit=", val); } else val = c->memory_limit;