aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_cgroup.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_cgroup.c')
-rw-r--r--mm/page_cgroup.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 39d216d535ea..6bdc67dbbc28 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -513,11 +513,10 @@ int swap_cgroup_swapon(int type, unsigned long max_pages)
513 length = DIV_ROUND_UP(max_pages, SC_PER_PAGE); 513 length = DIV_ROUND_UP(max_pages, SC_PER_PAGE);
514 array_size = length * sizeof(void *); 514 array_size = length * sizeof(void *);
515 515
516 array = vmalloc(array_size); 516 array = vzalloc(array_size);
517 if (!array) 517 if (!array)
518 goto nomem; 518 goto nomem;
519 519
520 memset(array, 0, array_size);
521 ctrl = &swap_cgroup_ctrl[type]; 520 ctrl = &swap_cgroup_ctrl[type];
522 mutex_lock(&swap_cgroup_mutex); 521 mutex_lock(&swap_cgroup_mutex);
523 ctrl->length = length; 522 ctrl->length = length;