Commit 1cc53a04 authored by Muchun Song's avatar Muchun Song Committed by Andrew Morton

mm: hugetlb_vmemmap: remove redundant list_del()

The ->lru field will be assigned to a new value in __free_page().  So it
is unnecessary to delete it from the @list.  Just remove it to simplify
the code.

Link: https://lkml.kernel.org/r/20221027033641.66709-1-songmuchun@bytedance.comSigned-off-by: default avatarMuchun Song <songmuchun@bytedance.com>
Reviewed-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent d302c239
...@@ -232,10 +232,8 @@ static void free_vmemmap_page_list(struct list_head *list) ...@@ -232,10 +232,8 @@ static void free_vmemmap_page_list(struct list_head *list)
{ {
struct page *page, *next; struct page *page, *next;
list_for_each_entry_safe(page, next, list, lru) { list_for_each_entry_safe(page, next, list, lru)
list_del(&page->lru);
free_vmemmap_page(page); free_vmemmap_page(page);
}
} }
static void vmemmap_remap_pte(pte_t *pte, unsigned long addr, static void vmemmap_remap_pte(pte_t *pte, unsigned long addr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment