mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
Revert "mm/hugetlb: add folio_hstate()"
This reverts commit6b27a1f253which is commite51da3a9b6upstream. It breaks the Android kernel abi and can be brought back in the future in an abi-safe way if it is really needed. Bug: 161946584 Change-Id: I431cd23e83455c445568dc8dd589915bdb6594c4 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -863,15 +863,10 @@ static inline pte_t arch_make_huge_pte(pte_t entry, unsigned int shift,
|
||||
}
|
||||
#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)
|
||||
{
|
||||
return folio_hstate(page_folio(page));
|
||||
VM_BUG_ON_PAGE(!PageHuge(page), page);
|
||||
return size_to_hstate(page_size(page));
|
||||
}
|
||||
|
||||
static inline unsigned hstate_index_to_shift(unsigned index)
|
||||
@@ -1082,11 +1077,6 @@ static inline struct hstate *hstate_vma(struct vm_area_struct *vma)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct hstate *folio_hstate(struct folio *folio)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline struct hstate *page_hstate(struct page *page)
|
||||
{
|
||||
return NULL;
|
||||
|
||||
@@ -1640,7 +1640,7 @@ struct page *alloc_migration_target(struct page *page, unsigned long private)
|
||||
nid = folio_nid(folio);
|
||||
|
||||
if (folio_test_hugetlb(folio)) {
|
||||
struct hstate *h = folio_hstate(folio);
|
||||
struct hstate *h = page_hstate(&folio->page);
|
||||
|
||||
gfp_mask = htlb_modify_alloc_mask(h, gfp_mask);
|
||||
return alloc_huge_page_nodemask(h, nid, mtc->nmask, gfp_mask);
|
||||
|
||||
Reference in New Issue
Block a user