diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f11ba701e19979b67cf7142c6e8b61ca75afd062..a58e11f2db1512daca636222e3c85ff3903566db 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -898,6 +898,11 @@ static inline void huge_ptep_modify_prot_commit(struct vm_area_struct *vma, #else /* CONFIG_HUGETLB_PAGE */ struct hstate {}; +static inline struct hugepage_subpool *hugetlb_page_subpool(struct page *hpage) +{ + return NULL; +} + static inline int isolate_or_dissolve_huge_page(struct page *page, struct list_head *list) { diff --git a/mm/migrate.c b/mm/migrate.c index 8fc766e52e527e127d17f0e1c1d6a8f54d0b15ee..9bd6bc12aa7244093f2a722d262d853e62b870c7 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1293,7 +1293,7 @@ static int unmap_and_move_huge_page(new_page_t get_new_page, * page_mapping() set, hugetlbfs specific move page routine will not * be called and we could leak usage counts for subpools. */ - if (page_private(hpage) && !page_mapping(hpage)) { + if (hugetlb_page_subpool(hpage) && !page_mapping(hpage)) { rc = -EBUSY; goto out_unlock; }