mm/hugetlb: get rid of page_hstate()

Convert the last page_hstate() user to use folio_hstate() so page_hstate()
can be safely removed.

Link: https://lkml.kernel.org/r/20230719184145.301911-1-sidhartha.kumar@oracle.com
Signed-off-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Sidhartha Kumar
2023-07-19 11:41:45 -07:00
committed by Andrew Morton
parent 89be82b4fe
commit affd26b1fb
3 changed files with 7 additions and 17 deletions

View File

@@ -841,11 +841,6 @@ static inline struct hstate *folio_hstate(struct folio *folio)
return size_to_hstate(folio_size(folio));
}
static inline struct hstate *page_hstate(struct page *page)
{
return folio_hstate(page_folio(page));
}
static inline unsigned hstate_index_to_shift(unsigned index)
{
return hstates[index].order + PAGE_SHIFT;
@@ -1062,11 +1057,6 @@ static inline struct hstate *folio_hstate(struct folio *folio)
return NULL;
}
static inline struct hstate *page_hstate(struct page *page)
{
return NULL;
}
static inline struct hstate *size_to_hstate(unsigned long size)
{
return NULL;