diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/page_cgroup.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/linux/page_cgroup.h b/include/linux/page_cgroup.h index 1e6d34bfa094..d754b2dfbf2d 100644 --- a/include/linux/page_cgroup.h +++ b/include/linux/page_cgroup.h | |||
@@ -105,4 +105,39 @@ static inline void page_cgroup_init(void) | |||
105 | } | 105 | } |
106 | 106 | ||
107 | #endif | 107 | #endif |
108 | |||
109 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR_SWAP | ||
110 | #include <linux/swap.h> | ||
111 | extern struct mem_cgroup * | ||
112 | swap_cgroup_record(swp_entry_t ent, struct mem_cgroup *mem); | ||
113 | extern struct mem_cgroup *lookup_swap_cgroup(swp_entry_t ent); | ||
114 | extern int swap_cgroup_swapon(int type, unsigned long max_pages); | ||
115 | extern void swap_cgroup_swapoff(int type); | ||
116 | #else | ||
117 | #include <linux/swap.h> | ||
118 | |||
119 | static inline | ||
120 | struct mem_cgroup *swap_cgroup_record(swp_entry_t ent, struct mem_cgroup *mem) | ||
121 | { | ||
122 | return NULL; | ||
123 | } | ||
124 | |||
125 | static inline | ||
126 | struct mem_cgroup *lookup_swap_cgroup(swp_entry_t ent) | ||
127 | { | ||
128 | return NULL; | ||
129 | } | ||
130 | |||
131 | static inline int | ||
132 | swap_cgroup_swapon(int type, unsigned long max_pages) | ||
133 | { | ||
134 | return 0; | ||
135 | } | ||
136 | |||
137 | static inline void swap_cgroup_swapoff(int type) | ||
138 | { | ||
139 | return; | ||
140 | } | ||
141 | |||
142 | #endif | ||
108 | #endif | 143 | #endif |