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.
This commit is contained in:
Michal Koutný
2023-01-13 10:48:03 +09:00
committed by Yu Watanabe
parent 5228c58ebe
commit b7a41491ed
+2 -1
View File
@@ -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;