memcg: check under limit at shrink_usage
[sfrench/cifs-2.6.git] / mm / memcontrol.c
index 0f1f7a7374bade23cf0052719a349a97322c5af4..c0500e4d3a2f9d3c5d392888326780379d064a4f 100644 (file)
@@ -806,6 +806,7 @@ int mem_cgroup_shrink_usage(struct mm_struct *mm, gfp_t gfp_mask)
 
        do {
                progress = try_to_free_mem_cgroup_pages(mem, gfp_mask);
+               progress += res_counter_check_under_limit(&mem->res);
        } while (!progress && --retry);
 
        css_put(&mem->css);