pmd_to_softleaf_folio() reads as if it converted a PMD into a folio. What it does is decode the softleaf entry stored in the PMD and return the folio that entry references - the direction softleaf_to_folio() already spells out. No functional change intended. Suggested-by: Dev Jain Signed-off-by: Usama Arif Acked-by: David Hildenbrand (Arm) Reviewed-by: Lorenzo Stoakes (ARM) Reviewed-by: Zi Yan Acked-by: Kiryl Shutsemau (Meta) Reviewed-by: Barry Song Reviewed-by: Baoquan He Reviewed-by: Qi Zheng --- include/linux/leafops.h | 4 ++-- mm/huge_memory.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/leafops.h b/include/linux/leafops.h index 4c1476ae32343..7c13c58a5e218 100644 --- a/include/linux/leafops.h +++ b/include/linux/leafops.h @@ -657,7 +657,7 @@ static inline bool pmd_is_valid_softleaf(pmd_t pmd) } /** - * pmd_to_softleaf_folio() - Convert the PMD entry to a folio. + * pmd_softleaf_to_folio() - Convert the PMD softleaf entry to a folio. * @pmd: PMD entry. * * The PMD entry is expected to be a valid PMD softleaf entry. @@ -665,7 +665,7 @@ static inline bool pmd_is_valid_softleaf(pmd_t pmd) * Returns: the folio the softleaf entry references if this is a valid softleaf * entry, otherwise NULL. */ -static inline struct folio *pmd_to_softleaf_folio(pmd_t pmd) +static inline struct folio *pmd_softleaf_to_folio(pmd_t pmd) { const softleaf_t entry = softleaf_from_pmd(pmd); diff --git a/mm/huge_memory.c b/mm/huge_memory.c index cda3c886ec533..e425a5b05aa2e 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2516,7 +2516,7 @@ static struct folio *normal_or_softleaf_folio_pmd(struct vm_area_struct *vma, if (!thp_migration_supported()) WARN_ONCE(1, "Non present huge pmd without pmd migration enabled!"); - return pmd_to_softleaf_folio(pmdval); + return pmd_softleaf_to_folio(pmdval); } static bool vma_has_deposited_pgtable(struct vm_area_struct *vma) -- 2.53.0-Meta