X-Git-Url: https://git.codelabs.ch/?p=muen%2Flinux.git;a=blobdiff_plain;f=mm%2Fmemcontrol.c;h=10a9b554d69f3e9c2c99a36e792565b881efabc9;hp=92d38c88250ffff8549438d6da0a07e2c36498c9;hb=7a1adfddaf0d11a39fdcaf6e82a88e9c0586e08b;hpb=64081362e8ff4587b4554087f3cfc73d3e0a4cd7;ds=sidebyside diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 92d38c88250f..10a9b554d69f 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -1669,6 +1669,8 @@ static enum oom_status mem_cgroup_oom(struct mem_cgroup *memcg, gfp_t mask, int if (order > PAGE_ALLOC_COSTLY_ORDER) return OOM_SKIPPED; + memcg_memory_event(memcg, MEMCG_OOM); + /* * We are in the middle of the charge context here, so we * don't want to block when potentially sitting on a callstack @@ -2250,8 +2252,6 @@ retry: if (fatal_signal_pending(current)) goto force; - memcg_memory_event(mem_over_limit, MEMCG_OOM); - /* * keep retrying as long as the memcg oom killer is able to make * a forward progress or bypass the charge if the oom killer