mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
Revert "mm/hugetlb: add hugetlb_folio_subpool() helpers"
This reverts commit6a8af731a1which is commit149562f750upstream. 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: I2987d07bc7063ecb38b8565a2dbd943fdf251aa2 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -1108,10 +1108,10 @@ static int hugetlbfs_migrate_folio(struct address_space *mapping,
|
||||
if (rc != MIGRATEPAGE_SUCCESS)
|
||||
return rc;
|
||||
|
||||
if (hugetlb_folio_subpool(src)) {
|
||||
hugetlb_set_folio_subpool(dst,
|
||||
hugetlb_folio_subpool(src));
|
||||
hugetlb_set_folio_subpool(src, NULL);
|
||||
if (hugetlb_page_subpool(&src->page)) {
|
||||
hugetlb_set_page_subpool(&dst->page,
|
||||
hugetlb_page_subpool(&src->page));
|
||||
hugetlb_set_page_subpool(&src->page, NULL);
|
||||
}
|
||||
|
||||
if (mode != MIGRATE_SYNC_NO_COPY)
|
||||
|
||||
@@ -754,29 +754,18 @@ extern unsigned int default_hstate_idx;
|
||||
|
||||
#define default_hstate (hstates[default_hstate_idx])
|
||||
|
||||
static inline struct hugepage_subpool *hugetlb_folio_subpool(struct folio *folio)
|
||||
{
|
||||
return (void *)folio_get_private_1(folio);
|
||||
}
|
||||
|
||||
/*
|
||||
* hugetlb page subpool pointer located in hpage[1].private
|
||||
*/
|
||||
static inline struct hugepage_subpool *hugetlb_page_subpool(struct page *hpage)
|
||||
{
|
||||
return hugetlb_folio_subpool(page_folio(hpage));
|
||||
}
|
||||
|
||||
static inline void hugetlb_set_folio_subpool(struct folio *folio,
|
||||
struct hugepage_subpool *subpool)
|
||||
{
|
||||
folio_set_private_1(folio, (unsigned long)subpool);
|
||||
return (void *)page_private(hpage + SUBPAGE_INDEX_SUBPOOL);
|
||||
}
|
||||
|
||||
static inline void hugetlb_set_page_subpool(struct page *hpage,
|
||||
struct hugepage_subpool *subpool)
|
||||
{
|
||||
hugetlb_set_folio_subpool(page_folio(hpage), subpool);
|
||||
set_page_private(hpage + SUBPAGE_INDEX_SUBPOOL, (unsigned long)subpool);
|
||||
}
|
||||
|
||||
static inline struct hstate *hstate_file(struct file *f)
|
||||
|
||||
Reference in New Issue
Block a user