aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2011-03-23 19:42:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-23 22:46:26 -0400
commit97a6c37b34f46feed2544bd40891ee6dd0fd1554 (patch)
tree6135189ba1f589d7a3b10c5e24da9a42ea9036f5 /include
parentad324e94475a04cfcdfdb11ad20f8ea81268e411 (diff)
memcg: change page_cgroup_zoneinfo signature
Instead of passing a whole struct page_cgroup to this function, let it take only what it really needs from it: the struct mem_cgroup and the page. This has the advantage that reading pc->mem_cgroup is now done at the same place where the ordering rules for this pointer are enforced and explained. It is also in preparation for removing the pc->page backpointer. 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> Cc: Minchan Kim <minchan.kim@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/page_cgroup.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h
index 6d6cb7a57bb3..363bbc8b0f49 100644
--- a/include/linux/page_cgroup.h
+++ b/include/linux/page_cgroup.h
@@ -85,16 +85,6 @@ SETPCGFLAG(Migration, MIGRATION)
85CLEARPCGFLAG(Migration, MIGRATION) 85CLEARPCGFLAG(Migration, MIGRATION)
86TESTPCGFLAG(Migration, MIGRATION) 86TESTPCGFLAG(Migration, MIGRATION)
87 87
88static inline int page_cgroup_nid(struct page_cgroup *pc)
89{
90 return page_to_nid(pc->page);
91}
92
93static inline enum zone_type page_cgroup_zid(struct page_cgroup *pc)
94{
95 return page_zonenum(pc->page);
96}
97
98static inline void lock_page_cgroup(struct page_cgroup *pc) 88static inline void lock_page_cgroup(struct page_cgroup *pc)
99{ 89{
100 /* 90 /*