diff options
author | Bob Liu <lliubbo@gmail.com> | 2012-01-12 20:18:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-12 23:13:07 -0500 |
commit | 9fb4b7cc0724f178d4b24a2a566ea1e7cb120b82 (patch) | |
tree | 0f2db9102d46f5e5c8492864fb1bd21f2e7cd768 /include/linux/page_cgroup.h | |
parent | 40f23a21a8501c1b2c65c50c19b516488ac31313 (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.h | 4 |
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) | |||
149 | extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, | 149 | extern unsigned short swap_cgroup_cmpxchg(swp_entry_t ent, |
150 | unsigned short old, unsigned short new); | 150 | unsigned short old, unsigned short new); |
151 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); | 151 | extern unsigned short swap_cgroup_record(swp_entry_t ent, unsigned short id); |
152 | extern unsigned short lookup_swap_cgroup(swp_entry_t ent); | 152 | extern unsigned short lookup_swap_cgroup_id(swp_entry_t ent); |
153 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); | 153 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); |
154 | extern void swap_cgroup_swapoff(int type); | 154 | extern 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 | ||
163 | static inline | 163 | static inline |
164 | unsigned short lookup_swap_cgroup(swp_entry_t ent) | 164 | unsigned short lookup_swap_cgroup_id(swp_entry_t ent) |
165 | { | 165 | { |
166 | return 0; | 166 | return 0; |
167 | } | 167 | } |