Merge branch 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux into drm...
[cascardo/linux.git] / mm / memcontrol.c
index d71d387..cf428d7 100644 (file)
@@ -1604,7 +1604,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)
+       if (!current->memcg_may_oom || current->memcg_in_oom)
                return;
        /*
         * We are in the middle of the charge context here, so we
@@ -2652,8 +2652,7 @@ static inline bool memcg_has_children(struct mem_cgroup *memcg)
 }
 
 /*
- * Reclaims as many pages from the given memcg as possible and moves
- * the rest to the parent.
+ * Reclaims as many pages from the given memcg as possible.
  *
  * Caller is responsible for holding css reference for memcg.
  */