mm/hugetlb: replace page_ref_freeze() with folio_ref_freeze() in hugetlb_folio_init_vmemmap()

Message ID 20230926174433.81241-1-sidhartha.kumar@oracle.com
State New
Headers
Series mm/hugetlb: replace page_ref_freeze() with folio_ref_freeze() in hugetlb_folio_init_vmemmap() |

Commit Message

Sidhartha Kumar Sept. 26, 2023, 5:44 p.m. UTC
  No functional difference, folio_ref_freeze() is currently a wrapper for
page_ref_freeze().

Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>

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

Comments

Muchun Song Sept. 27, 2023, 12:11 a.m. UTC | #1
> On Sep 27, 2023, at 01:45, Sidhartha Kumar <sidhartha.kumar@oracle.com> wrote:
> 
> 
> No functional difference, folio_ref_freeze() is currently a wrapper for
> page_ref_freeze().
> 
> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>

Reviewed-by: Muchun Song <songmuchun@bytedance.com> 

Thanks
  

Patch

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);