2023-09-26 21:13:14

by Sidhartha Kumar

[permalink] [raw]
Subject: [PATCH] mm/hugetlb: replace page_ref_freeze() with folio_ref_freeze() in hugetlb_folio_init_vmemmap()


No functional difference, folio_ref_freeze() is currently a wrapper for
page_ref_freeze().

Signed-off-by: Sidhartha Kumar <[email protected]>

---
mm/hugetlb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index dc35ae8fdd61..77a399afb60a 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -3191,7 +3191,7 @@ static void __init hugetlb_folio_init_vmemmap(struct folio *folio,
/* Prepare folio head */
__folio_clear_reserved(folio);
__folio_set_head(folio);
- ret = page_ref_freeze(&folio->page, 1);
+ ret = folio_ref_freeze(folio, 1);
VM_BUG_ON(!ret);
/* Initialize the necessary tail struct pages */
hugetlb_folio_init_tail_vmemmap(folio, 1, nr_pages);
--
2.41.0


2023-09-27 07:54:43

by Muchun Song

[permalink] [raw]
Subject: Re: [PATCH] mm/hugetlb: replace page_ref_freeze() with folio_ref_freeze() in hugetlb_folio_init_vmemmap()



> On Sep 27, 2023, at 01:45, Sidhartha Kumar <[email protected]> wrote:
>
> 
> No functional difference, folio_ref_freeze() is currently a wrapper for
> page_ref_freeze().
>
> Signed-off-by: Sidhartha Kumar <[email protected]>

Reviewed-by: Muchun Song <[email protected]>

Thanks