diff options
-rw-r--r-- | include/linux/hugetlb.h | 5 | ||||
-rw-r--r-- | mm/migrate.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 3c0117656745..28a110ec2a0d 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -875,6 +875,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 41ff2c9896c4..047209d6602e 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1288,7 +1288,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; } |