Commit d0ddf49b authored by Wei Yang's avatar Wei Yang Committed by Linus Torvalds

mm/page_alloc.c: use NODE_MASK_NONE in build_zonelists()

Slightly simplify the code by initializing user_mask with NODE_MASK_NONE,
instead of later calling nodes_clear().  This saves a line of code.
Signed-off-by: default avatarWei Yang <richard.weiyang@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Reviewed-by: default avatarJohn Hubbard <jhubbard@nvidia.com>
Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
Reviewed-by: default avatarPankaj Gupta <pankaj.gupta.linux@gmail.com>
Link: http://lkml.kernel.org/r/20200330220840.21228-1-richard.weiyang@gmail.comSigned-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 97a225e6
...@@ -5692,14 +5692,13 @@ static void build_zonelists(pg_data_t *pgdat) ...@@ -5692,14 +5692,13 @@ static void build_zonelists(pg_data_t *pgdat)
{ {
static int node_order[MAX_NUMNODES]; static int node_order[MAX_NUMNODES];
int node, load, nr_nodes = 0; int node, load, nr_nodes = 0;
nodemask_t used_mask; nodemask_t used_mask = NODE_MASK_NONE;
int local_node, prev_node; int local_node, prev_node;
/* NUMA-aware ordering of nodes */ /* NUMA-aware ordering of nodes */
local_node = pgdat->node_id; local_node = pgdat->node_id;
load = nr_online_nodes; load = nr_online_nodes;
prev_node = local_node; prev_node = local_node;
nodes_clear(used_mask);
memset(node_order, 0, sizeof(node_order)); memset(node_order, 0, sizeof(node_order));
while ((node = find_next_best_node(local_node, &used_mask)) >= 0) { while ((node = find_next_best_node(local_node, &used_mask)) >= 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment