]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
memcg: charged pages always have valid per-memcg zone info
authorJohannes Weiner <hannes@cmpxchg.org>
Wed, 23 Mar 2011 23:42:31 +0000 (16:42 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Mar 2011 02:46:28 +0000 (19:46 -0700)
page_cgroup_zoneinfo() will never return NULL for a charged page, remove
the check for it in mem_cgroup_get_reclaim_stat_from_page().

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c

index 660dfc27d971e83a910e6742eff48576afc048d7..b35a28d80ab59eb8919e5ae85cc624a7a80455e0 100644 (file)
@@ -1043,9 +1043,6 @@ mem_cgroup_get_reclaim_stat_from_page(struct page *page)
        /* Ensure pc->mem_cgroup is visible after reading PCG_USED. */
        smp_rmb();
        mz = page_cgroup_zoneinfo(pc->mem_cgroup, page);
-       if (!mz)
-               return NULL;
-
        return &mz->reclaim_stat;
 }