]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - mm/memcontrol.c
memcg: fix refcnt going negative
[net-next-2.6.git] / mm / memcontrol.c
index e2b98a6875c079b36f103b724130462591094735..21a30629ca801d5a400837b1289a03dd03a77450 100644 (file)
@@ -447,9 +447,10 @@ static struct mem_cgroup_per_zone *
 __mem_cgroup_largest_soft_limit_node(struct mem_cgroup_tree_per_zone *mctz)
 {
        struct rb_node *rightmost = NULL;
-       struct mem_cgroup_per_zone *mz = NULL;
+       struct mem_cgroup_per_zone *mz;
 
 retry:
+       mz = NULL;
        rightmost = rb_last(&mctz->rb_root);
        if (!rightmost)
                goto done;              /* Nothing to reclaim from */