Skip to content

Commit

Permalink
mm/page_alloc.c: use NODE_MASK_NONE in build_zonelists()
Browse files Browse the repository at this point in the history
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: Wei Yang <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reviewed-by: John Hubbard <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Reviewed-by: Pankaj Gupta <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
RichardWeiYang authored and torvalds committed Jun 4, 2020
1 parent 97a225e commit d0ddf49
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mm/page_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -5692,14 +5692,13 @@ static void build_zonelists(pg_data_t *pgdat)
{
static int node_order[MAX_NUMNODES];
int node, load, nr_nodes = 0;
nodemask_t used_mask;
nodemask_t used_mask = NODE_MASK_NONE;
int local_node, prev_node;

/* NUMA-aware ordering of nodes */
local_node = pgdat->node_id;
load = nr_online_nodes;
prev_node = local_node;
nodes_clear(used_mask);

memset(node_order, 0, sizeof(node_order));
while ((node = find_next_best_node(local_node, &used_mask)) >= 0) {
Expand Down

0 comments on commit d0ddf49

Please sign in to comment.