limit-util: quieten a very common debug message that is misleading

This commit is contained in:
Lennart Poettering 2020-05-14 19:11:18 +02:00
parent 411e835c50
commit 7cd9e4f8a0
1 changed files with 5 additions and 0 deletions

View File

@ -41,6 +41,11 @@ uint64_t physical_memory(void) {
}
if (r > 0) {
r = cg_get_attribute("memory", root, "memory.max", &value);
if (r == -ENOENT) /* Field does not exist on the system's top-level cgroup, hence don't
* complain. (Note that it might exist on our own root though, if we live
* in a cgroup namespace, hence check anyway instead of not even
* trying.) */
return mem;
if (r < 0) {
log_debug_errno(r, "Failed to read memory.max cgroup attribute, ignoring cgroup memory limit: %m");
return mem;