diff options
author | Anita Zhang <the.anitazha@gmail.com> | 2021-02-05 03:00:11 -0800 |
---|---|---|
committer | Anita Zhang <the.anitazha@gmail.com> | 2021-02-09 01:23:58 -0800 |
commit | df7f3eab52178331104650db0bc5fb95564e1394 (patch) | |
tree | 3b7ecdc3e01647910ffa5ce1d85363b64322598b /src/oom | |
parent | e303833355bd786a5c3e54e39d3a96488142386d (diff) | |
download | systemd-df7f3eab52178331104650db0bc5fb95564e1394.tar.gz |
oom: wrap reply.path with empty_to_root
Diffstat (limited to 'src/oom')
-rw-r--r-- | src/oom/oomd-manager.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/oom/oomd-manager.c b/src/oom/oomd-manager.c index 338935b3ec..825fe38e18 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; } |