Skip to contentSkip to conversation

+ ksm-remove-redundant-__gfp_zero-from-kcalloc.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Sep 13, 2013

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + ksm-remove-redundant-__gfp_zero-from-kcalloc.patch added to -mm tree
To: [email protected],[email protected]
From: [email protected]
Date: Fri, 13 Sep 2013 14:48:03 -0700

The patch titled
Subject: ksm: Remove redundant __GFP_ZERO from kcalloc
has been added to the -mm tree. Its filename is
ksm-remove-redundant-__gfp_zero-from-kcalloc.patch

This patch should soon appear at
http://ozlabs.org/~akpm/mmots/broken-out/ksm-remove-redundant-__gfp_zero-from-kcalloc.patch
and later at
http://ozlabs.org/~akpm/mmotm/broken-out/ksm-remove-redundant-__gfp_zero-from-kcalloc.patch

Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated there every 3-4 working days

------------------------------------------------------
From: Joe Perches <[email protected]>
Subject: ksm: Remove redundant __GFP_ZERO from kcalloc

kcalloc returns zeroed memory. There's no need to use this flag.

---

 mm/ksm.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
mm/ksm.c renamed from mm/ksm.c~ksm-remove-redundant-__gfp_zero-from-kcalloc +2 -2
diff -puN mm/ksm.c~ksm-remove-redundant-__gfp_zero-from-kcalloc mm/ksm.c
@@ -2309,8 +2309,8 @@ static ssize_t merge_across_nodes_store(
 			 * 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;

_

Patches currently in -mm which might be from [email protected] are

origin.patch kernel-timerc-convert-kmalloc_nodegfp_zero-to-kzalloc_node.patch ksm-remove-redundant-__gfp_zero-from-kcalloc.patch linux-next.patch