ksm: remove redundant __GFP_ZERO from kcalloc
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>
This commit is contained in:
committed by
Linus Torvalds
parent
63d0f0a3c7
commit
bafe1e1440
@@ -2309,8 +2309,8 @@ static ssize_t merge_across_nodes_store(struct kobject *kobj,
|
|||||||
* Allocate stable and unstable together:
|
* Allocate stable and unstable together:
|
||||||
* MAXSMP NODES_SHIFT 10 will use 16kB.
|
* MAXSMP NODES_SHIFT 10 will use 16kB.
|
||||||
*/
|
*/
|
||||||
buf = kcalloc(nr_node_ids + nr_node_ids,
|
buf = kcalloc(nr_node_ids + nr_node_ids, sizeof(*buf),
|
||||||
sizeof(*buf), GFP_KERNEL | __GFP_ZERO);
|
GFP_KERNEL);
|
||||||
/* Let us assume that RB_ROOT is NULL is zero */
|
/* Let us assume that RB_ROOT is NULL is zero */
|
||||||
if (!buf)
|
if (!buf)
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
|
|||||||
Reference in New Issue
Block a user