summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBob Liu <lliubbo@gmail.com>2012-01-13 05:18:48 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-13 08:13:07 +0400
commit9fb4b7cc0724f178d4b24a2a566ea1e7cb120b82 (patch)
tree0f2db9102d46f5e5c8492864fb1bd21f2e7cd768 /include
parent40f23a21a8501c1b2c65c50c19b516488ac31313 (diff)
downloadlinux-9fb4b7cc0724f178d4b24a2a566ea1e7cb120b82.tar.xz
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')
-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)
extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent,
unsigned short old, unsigned short new);
extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id);
-extern unsigned short lookup_swap_cgroup(swp_entry_t ent);
+extern unsigned short lookup_swap_cgroup_id(swp_entry_t ent);
extern int swap_cgroup_swapon(int type, unsigned long max_pages);
extern void swap_cgroup_swapoff(int type);
#else
@@ -161,7 +161,7 @@ unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id)
}
static inline
-unsigned short lookup_swap_cgroup(swp_entry_t ent)
+unsigned short lookup_swap_cgroup_id(swp_entry_t ent)
{
return 0;
}