[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y1rTl/1lgpKwVE8T@monkey>
Date: Thu, 27 Oct 2022 11:53:11 -0700
From: Mike Kravetz <mike.kravetz@...cle.com>
To: Muchun Song <songmuchun@...edance.com>
Cc: muchun.song@...ux.dev, akpm@...ux-foundation.org,
linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: hugetlb_vmemmap: remove redundant list_del()
On 10/27/22 11:36, Muchun Song wrote:
> 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.
>
> Signed-off-by: Muchun Song <songmuchun@...edance.com>
> ---
> mm/hugetlb_vmemmap.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Thanks,
Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
--
Mike Kravetz
>
> diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
> index 20f414c0379f..c98805d5b815 100644
> --- a/mm/hugetlb_vmemmap.c
> +++ b/mm/hugetlb_vmemmap.c
> @@ -231,10 +231,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,
> --
> 2.11.0
>
Powered by blists - more mailing lists