Skip to content
Commit 0479150e authored by Baoquan He's avatar Baoquan He Committed by Andrew Morton
Browse files

mm/init: remove the unnecessary special treatment for memory-less node

Because memory-less node's ->node_present_pages and its zone's
->present_pages are all 0, the judgement before calling node_set_state()
to set N_MEMORY, N_HIGH_MEMORY, N_NORMAL_MEMORY for node is enough to skip
memory-less node.  The 'continue;' statement inside for_each_node() loop
of free_area_init() is gilding the lily.

Here, remove the special handling to make memory-less node share the same
code flow as normal node.  And the code comment above the 'continue'
statement is not needed either.

Link: https://lkml.kernel.org/r/20240326061134.1055295-3-bhe@redhat.com


Signed-off-by: default avatarBaoquan He <bhe@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: "Mike Rapoport (IBM)" <rppt@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 4febff41
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment