]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mm/page_alloc.c: use NODE_MASK_NONE in build_zonelists()
authorWei Yang <richard.weiyang@gmail.com>
Wed, 3 Jun 2020 22:59:05 +0000 (15:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Jun 2020 03:09:45 +0000 (20:09 -0700)
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 <richard.weiyang@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Link: http://lkml.kernel.org/r/20200330220840.21228-1-richard.weiyang@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c

index 5ef1eff330a2f0ac54e7ed86c27c56365c6a6b17..818c2644a20070a0d712f1928a6114c7a09c11e3 100644 (file)
@@ -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) {