From: Wei Yang Date: Fri, 13 May 2022 03:22:59 +0000 (-0700) Subject: mm/vmscan: not necessary to re-init the list for each iteration X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=048f6e1a427ee9cddf62f9b3766372c69846fa4f;p=linux.git 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. [akpm@linux-foundation.org: remove unneeded braces] Link: https://lkml.kernel.org/r/20220426021743.21007-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Signed-off-by: Andrew Morton --- diff --git a/mm/vmscan.c b/mm/vmscan.c index 5ac0a71dc0dfc..726f5ce366daf 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);