aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/page_cgroup.h
diff options
context:
space:
mode:
authorBob Liu <lliubbo@gmail.com>2012-01-12 20:18:48 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-12 23:13:07 -0500
commit9fb4b7cc0724f178d4b24a2a566ea1e7cb120b82 (patch)
tree0f2db9102d46f5e5c8492864fb1bd21f2e7cd768 /include/linux/page_cgroup.h
parent40f23a21a8501c1b2c65c50c19b516488ac31313 (diff)
page_cgroup: add helper function to get swap_cgroup
There are multiple places which need to get the swap_cgroup address, so add a helper function: static struct swap_cgroup *swap_cgroup_getsc(swp_entry_t ent, struct swap_cgroup_ctrl **ctrl); to simplify the code. Signed-off-by: Bob Liu <lliubbo@gmail.com> Acked-by: Michal Hocko <mhocko@suse.cz> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Johannes Weiner <jweiner@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/page_cgroup.h')
-rw-r--r--include/linux/page_cgroup.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h
index aaa60da8783c..1153095ee457 100644
--- a/include/linux/page_cgroup.h
+++ b/include/linux/page_cgroup.h
@@ -149,7 +149,7 @@ static inline void __init page_cgroup_init_flatmem(void)
149extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, 149extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent,
150 unsigned short old, unsigned short new); 150 unsigned short old, unsigned short new);
151extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); 151extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id);
152extern unsigned short lookup_swap_cgroup(swp_entry_t ent); 152extern unsigned short lookup_swap_cgroup_id(swp_entry_t ent);
153extern int swap_cgroup_swapon(int type, unsigned long max_pages); 153extern int swap_cgroup_swapon(int type, unsigned long max_pages);
154extern void swap_cgroup_swapoff(int type); 154extern void swap_cgroup_swapoff(int type);
155#else 155#else
@@ -161,7 +161,7 @@ unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id)
161} 161}
162 162
163static inline 163static inline
164unsigned short lookup_swap_cgroup(swp_entry_t ent) 164unsigned short lookup_swap_cgroup_id(swp_entry_t ent)
165{ 165{
166 return 0; 166 return 0;
167} 167}