The quilt patch titled Subject: mm/hugetlb: add folio_hstate() has been removed from the -mm tree. Its filename was mm-hugetlb-add-folio_hstate.patch This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm ------------------------------------------------------ From: Sidhartha Kumar <sidhartha.kumar@xxxxxxxxxx> Subject: mm/hugetlb: add folio_hstate() Date: Thu, 22 Sep 2022 10:42:07 -0500 Helper function to retrieve hstate information from a hugetlb folio. Link: https://lkml.kernel.org/r/20220922154207.1575343-6-sidhartha.kumar@xxxxxxxxxx Signed-off-by: Sidhartha Kumar <sidhartha.kumar@xxxxxxxxxx> Reported-by: kernel test robot <lkp@xxxxxxxxx> Reviewed-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Cc: Colin Cross <ccross@xxxxxxxxxx> Cc: David Howells <dhowells@xxxxxxxxxx> Cc: "Eric W . Biederman" <ebiederm@xxxxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Cc: Muchun Song <songmuchun@xxxxxxxxxxxxx> Cc: Peter Xu <peterx@xxxxxxxxxx> Cc: Vlastimil Babka <vbabka@xxxxxxx> Cc: William Kucharski <william.kucharski@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/hugetlb.h | 14 ++++++++++++-- mm/migrate.c | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) --- a/include/linux/hugetlb.h~mm-hugetlb-add-folio_hstate +++ a/include/linux/hugetlb.h @@ -824,10 +824,15 @@ static inline pte_t arch_make_huge_pte(p } #endif +static inline struct hstate *folio_hstate(struct folio *folio) +{ + VM_BUG_ON_FOLIO(!folio_test_hugetlb(folio), folio); + return size_to_hstate(folio_size(folio)); +} + static inline struct hstate *page_hstate(struct page *page) { - VM_BUG_ON_PAGE(!PageHuge(page), page); - return size_to_hstate(page_size(page)); + return folio_hstate(page_folio(page)); } static inline unsigned hstate_index_to_shift(unsigned index) @@ -1035,6 +1040,11 @@ static inline struct hstate *hstate_vma( { return NULL; } + +static inline struct hstate *folio_hstate(struct folio *folio) +{ + return NULL; +} static inline struct hstate *page_hstate(struct page *page) { --- a/mm/migrate.c~mm-hugetlb-add-folio_hstate +++ a/mm/migrate.c @@ -1620,7 +1620,7 @@ struct page *alloc_migration_target(stru nid = folio_nid(folio); if (folio_test_hugetlb(folio)) { - struct hstate *h = page_hstate(&folio->page); + struct hstate *h = folio_hstate(folio); gfp_mask = htlb_modify_alloc_mask(h, gfp_mask); return alloc_huge_page_nodemask(h, nid, mtc->nmask, gfp_mask); _ Patches currently in -mm which might be from sidhartha.kumar@xxxxxxxxxx are mm-hugetlb_cgroup-convert-__set_hugetlb_cgroup-to-folios.patch mm-hugetlb_cgroup-convert-hugetlb_cgroup_from_page-to-folios.patch mm-hugetlb_cgroup-convert-set_hugetlb_cgroup-to-folios.patch mm-hugetlb_cgroup-convert-hugetlb_cgroup_migrate-to-folios.patch mm-hugetlb-convert-isolate_or_dissolve_huge_page-to-folios.patch mm-hugetlb-convert-free_huge_page-to-folios.patch mm-hugetlb_cgroup-convert-hugetlb_cgroup_uncharge_page-to-folios.patch mm-hugeltb_cgroup-convert-hugetlb_cgroup_commit_charge-to-folios.patch mm-hugetlb-convert-move_hugetlb_state-to-folios.patch