]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Signed-off-by: Bob Liu <lliubbo@gmail.com>
authorBob Liu <lliubbo@gmail.com>
Wed, 24 Aug 2011 23:47:41 +0000 (09:47 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 Sep 2011 06:19:34 +0000 (16:19 +1000)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_cgroup.c

index 39d216d535eaed26ff926dbf403de24d744e69a6..6bdc67dbbc28920c36d0511057071d7229f58e39 100644 (file)
@@ -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;