ksm: remove redundant __GFP_ZERO from kcalloc
authorJoe Perches <joe@perches.com>
Tue, 12 Nov 2013 23:07:10 +0000 (15:07 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 13 Nov 2013 03:09:02 +0000 (12:09 +0900)
kcalloc returns zeroed memory.  There's no need to use this flag.

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/ksm.c

index 0bea2b262a47837f1c0bd81492e9cfdd30daa041..175fff79dc95749f6607aaa70976ebff09193397 100644 (file)
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -2309,8 +2309,8 @@ static ssize_t merge_across_nodes_store(struct kobject *kobj,
                         * Allocate stable and unstable together:
                         * MAXSMP NODES_SHIFT 10 will use 16kB.
                         */
-                       buf = kcalloc(nr_node_ids + nr_node_ids,
-                               sizeof(*buf), GFP_KERNEL | __GFP_ZERO);
+                       buf = kcalloc(nr_node_ids + nr_node_ids, sizeof(*buf),
+                                     GFP_KERNEL);
                        /* Let us assume that RB_ROOT is NULL is zero */
                        if (!buf)
                                err = -ENOMEM;