@@ -119,6 +119,9 @@ struct hugepage_subpool *hugepage_new_subpool(struct hstate *h, long max_hpages,
long min_hpages);
void hugepage_put_subpool(struct hugepage_subpool *spool);
+long hugepage_subpool_get_pages(struct hugepage_subpool *spool, long delta);
+long hugepage_subpool_put_pages(struct hugepage_subpool *spool, long delta);
+
void hugetlb_dup_vma_private(struct vm_area_struct *vma);
void clear_vma_resv_huge_pages(struct vm_area_struct *vma);
int move_hugetlb_page_tables(struct vm_area_struct *vma,
@@ -170,8 +170,7 @@ void hugepage_put_subpool(struct hugepage_subpool *spool)
* only be different than the passed value (delta) in the case where
* a subpool minimum size must be maintained.
*/
-static long hugepage_subpool_get_pages(struct hugepage_subpool *spool,
- long delta)
+long hugepage_subpool_get_pages(struct hugepage_subpool *spool, long delta)
{
long ret = delta;
@@ -215,8 +214,7 @@ static long hugepage_subpool_get_pages(struct hugepage_subpool *spool,
* The return value may only be different than the passed value (delta)
* in the case where a subpool minimum size must be maintained.
*/
-static long hugepage_subpool_put_pages(struct hugepage_subpool *spool,
- long delta)
+long hugepage_subpool_put_pages(struct hugepage_subpool *spool, long delta)
{
long ret = delta;
unsigned long flags;
This will allow hugetlb subpools to be used by guest_memfd. Signed-off-by: Ackerley Tng <ackerleytng@google.com> --- include/linux/hugetlb.h | 3 +++ mm/hugetlb.c | 6 ++---- 2 files changed, 5 insertions(+), 4 deletions(-)