Skip to content

Commit

Permalink
ksm: remove redundant __GFP_ZERO from kcalloc
Browse files Browse the repository at this point in the history
kcalloc returns zeroed memory.  There's no need to use this flag.

Signed-off-by: Joe Perches <[email protected]>
Reviewed-by: Wanpeng Li <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Nov 13, 2013
1 parent 63d0f0a commit bafe1e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mm/ksm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bafe1e1

Please sign in to comment.