X-Git-Url: http://bbs.cooldavid.org/git/?a=blobdiff_plain;f=mm%2Fmemcontrol.c;h=9be3cf8a5da462d4b1b4103eef61f8d5a9a6e06c;hb=ad4ca5f4b70236dab5e457ff6567d36f75d2e7c5;hp=3eed583895a6f31eb434a252697371c7daa6bbd4;hpb=f241e6607b5a5aefa23c652dbe947b7465633984;p=net-next-2.6.git diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 3eed583895a..9be3cf8a5da 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3587,9 +3587,13 @@ unlock: static void mem_cgroup_threshold(struct mem_cgroup *memcg) { - __mem_cgroup_threshold(memcg, false); - if (do_swap_account) - __mem_cgroup_threshold(memcg, true); + while (memcg) { + __mem_cgroup_threshold(memcg, false); + if (do_swap_account) + __mem_cgroup_threshold(memcg, true); + + memcg = parent_mem_cgroup(memcg); + } } static int compare_thresholds(const void *a, const void *b)