diff options
author | Michal Koutný <mkoutny@suse.com> | 2022-09-29 13:34:21 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-01-13 02:48:03 +0100 |
commit | b7a41491ed8bbfdc4ef1f9fb467a184fd2f131d4 (patch) | |
tree | 514effe9bf8570953839198c9f8f5c17b650ef6d /src/core/cgroup.c | |
parent | dissect-image: Notify btrfs when we're done using a loop device (diff) | |
download | systemd-b7a41491ed8bbfdc4ef1f9fb467a184fd2f131d4.tar.xz systemd-b7a41491ed8bbfdc4ef1f9fb467a184fd2f131d4.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/core/cgroup.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c index e04b903d5c..7f3782ae41 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; |