revert "mm: memcontrol: fix possible css ref leak on oom"
authorAndrew Morton <[email protected]>
Wed, 8 Jun 2016 22:33:47 +0000 (15:33 -0700)
committerLinus Torvalds <[email protected]>
Thu, 9 Jun 2016 21:23:11 +0000 (14:23 -0700)
Revert commit 1383399d7be0 ("mm: memcontrol: fix possible css ref leak
on oom").  Johannes points out "There is a task_in_memcg_oom() check
before calling mem_cgroup_oom()".

Acked-by: Michal Hocko <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memcontrol.c

index 58c69c94402a74498a488392eabeed15ddddd1ee..75e74408cc8f5081228288ed7bfd5d3e3ce9b4cd 100644 (file)
@@ -1608,7 +1608,7 @@ static void memcg_oom_recover(struct mem_cgroup *memcg)
 
 static void mem_cgroup_oom(struct mem_cgroup *memcg, gfp_t mask, int order)
 {
-       if (!current->memcg_may_oom || current->memcg_in_oom)
+       if (!current->memcg_may_oom)
                return;
        /*
         * We are in the middle of the charge context here, so we