aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWei Yang <[email protected]>2022-05-12 20:22:59 -0700
committerAndrew Morton <[email protected]>2022-05-13 07:20:13 -0700
commit048f6e1a427ee9cddf62f9b3766372c69846fa4f (patch)
treefcf2b70a405ace6b0235ddc1afee26ccae06bc7f
parent717aeab42943efa7cfa876b3b687c6ff36eae867 (diff)
mm/vmscan: not necessary to re-init the list for each iteration
node_page_list is defined with LIST_HEAD and be cleaned until list_empty. So it is not necessary to re-init it again. [[email protected]: remove unneeded braces] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Wei Yang <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
-rw-r--r--mm/vmscan.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 5ac0a71dc0df..726f5ce366da 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2553,10 +2553,8 @@ unsigned long reclaim_pages(struct list_head *page_list)
while (!list_empty(page_list)) {
page = lru_to_page(page_list);
- if (nid == NUMA_NO_NODE) {
+ if (nid == NUMA_NO_NODE)
nid = page_to_nid(page);
- INIT_LIST_HEAD(&node_page_list);
- }
if (nid == page_to_nid(page)) {
ClearPageActive(page);