From: Joe Perches Date: Sat, 28 May 2011 17:36:34 +0000 (-0700) Subject: mm: Convert vmalloc/memset to vzalloc X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8c1fec1ba83b7ce20b65a492a6e73e8d524aed88;p=linux-beck.git mm: Convert vmalloc/memset to vzalloc Signed-off-by: Joe Perches Acked-by: Paul Menage Signed-off-by: Jiri Kosina --- 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) length = DIV_ROUND_UP(max_pages, SC_PER_PAGE); array_size = length * sizeof(void *); - array = vmalloc(array_size); + array = vzalloc(array_size); if (!array) goto nomem; - memset(array, 0, array_size); ctrl = &swap_cgroup_ctrl[type]; mutex_lock(&swap_cgroup_mutex); ctrl->length = length;