swap_cgroup.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) swap_cgroup.c (1170532bb49f9468aedabdc1d5a560e2521a2bcc)
1#include <linux/swap_cgroup.h>
2#include <linux/vmalloc.h>
3#include <linux/mm.h>
4
5#include <linux/swapops.h> /* depends on mm.h include */
6
7static DEFINE_MUTEX(swap_cgroup_mutex);
8struct swap_cgroup_ctrl {

--- 160 unchanged lines hidden (view full) ---

169 mutex_unlock(&swap_cgroup_mutex);
170 vfree(array);
171 goto nomem;
172 }
173 mutex_unlock(&swap_cgroup_mutex);
174
175 return 0;
176nomem:
1#include <linux/swap_cgroup.h>
2#include <linux/vmalloc.h>
3#include <linux/mm.h>
4
5#include <linux/swapops.h> /* depends on mm.h include */
6
7static DEFINE_MUTEX(swap_cgroup_mutex);
8struct swap_cgroup_ctrl {

--- 160 unchanged lines hidden (view full) ---

169 mutex_unlock(&swap_cgroup_mutex);
170 vfree(array);
171 goto nomem;
172 }
173 mutex_unlock(&swap_cgroup_mutex);
174
175 return 0;
176nomem:
177 printk(KERN_INFO "couldn't allocate enough memory for swap_cgroup.\n");
178 printk(KERN_INFO
179 "swap_cgroup can be disabled by swapaccount=0 boot option\n");
177 pr_info("couldn't allocate enough memory for swap_cgroup\n");
178 pr_info("swap_cgroup can be disabled by swapaccount=0 boot option\n");
180 return -ENOMEM;
181}
182
183void swap_cgroup_swapoff(int type)
184{
185 struct page **map;
186 unsigned long i, length;
187 struct swap_cgroup_ctrl *ctrl;

--- 21 unchanged lines hidden ---
179 return -ENOMEM;
180}
181
182void swap_cgroup_swapoff(int type)
183{
184 struct page **map;
185 unsigned long i, length;
186 struct swap_cgroup_ctrl *ctrl;

--- 21 unchanged lines hidden ---