summaryrefslogtreecommitdiff
path: root/src/oom/oomd-manager.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-13 10:00:31 +0100
committerGitHub <noreply@github.com>2021-02-13 10:00:31 +0100
commitb3c57df0f554176e054c358811324bb629aedd02 (patch)
tree4169fed3eff7f472893019154add9369143e33c6 /src/oom/oomd-manager.c
parent7253850abf6e12e91671083642ecabe22fe99578 (diff)
parentd8a4d64bc37ad21381f584b6c25792995584c7a2 (diff)
downloadsystemd-b3c57df0f554176e054c358811324bb629aedd02.tar.gz
Merge pull request #18401 from anitazha/oomdxattr
oomd: implement avoid/omit support for cgroups
Diffstat (limited to 'src/oom/oomd-manager.c')
-rw-r--r--src/oom/oomd-manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/oom/oomd-manager.c b/src/oom/oomd-manager.c
index 52158a66e5..94b17dd07b 100644
--- a/src/oom/oomd-manager.c
+++ b/src/oom/oomd-manager.c
@@ -93,7 +93,7 @@ static int process_managed_oom_reply(
m->monitored_swap_cgroup_contexts : m->monitored_mem_pressure_cgroup_contexts;
if (reply.mode == MANAGED_OOM_AUTO) {
- (void) oomd_cgroup_context_free(hashmap_remove(monitor_hm, reply.path));
+ (void) oomd_cgroup_context_free(hashmap_remove(monitor_hm, empty_to_root(reply.path)));
continue;
}
@@ -109,7 +109,7 @@ static int process_managed_oom_reply(
}
}
- ret = oomd_insert_cgroup_context(NULL, monitor_hm, reply.path);
+ ret = oomd_insert_cgroup_context(NULL, monitor_hm, empty_to_root(reply.path));
if (ret == -ENOMEM) {
r = ret;
goto finish;
@@ -117,7 +117,7 @@ static int process_managed_oom_reply(
/* Always update the limit in case it was changed. For non-memory pressure detection the value is
* ignored so always updating it here is not a problem. */
- ctx = hashmap_get(monitor_hm, reply.path);
+ ctx = hashmap_get(monitor_hm, empty_to_root(reply.path));
if (ctx)
ctx->mem_pressure_limit = limit;
}