mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
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.com Signed-off-by: Muchun Song <songmuchun@bytedance.com> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
d302c2398b
commit
1cc53a047b
1 changed files with 1 additions and 3 deletions
|
@ -232,10 +232,8 @@ static void free_vmemmap_page_list(struct list_head *list)
|
|||
{
|
||||
struct page *page, *next;
|
||||
|
||||
list_for_each_entry_safe(page, next, list, lru) {
|
||||
list_del(&page->lru);
|
||||
list_for_each_entry_safe(page, next, list, lru)
|
||||
free_vmemmap_page(page);
|
||||
}
|
||||
}
|
||||
|
||||
static void vmemmap_remap_pte(pte_t *pte, unsigned long addr,
|
||||
|
|
Loading…
Add table
Reference in a new issue