From ece1ed7bfa1208b527b3dc90bb45c55e0d139a88 Mon Sep 17 00:00:00 2001 From: "Matthew Wilcox (Oracle)" Date: Fri, 4 Feb 2022 10:27:40 -0500 Subject: mm/gup: Add try_get_folio() and try_grab_folio() Convert try_get_compound_head() into try_get_folio() and convert try_grab_compound_head() into try_grab_folio(). Add a temporary try_grab_compound_head() wrapper around try_grab_folio() to let us convert callers individually. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Christoph Hellwig Reviewed-by: John Hubbard Reviewed-by: Jason Gunthorpe Reviewed-by: William Kucharski --- mm/internal.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mm/internal.h') diff --git a/mm/internal.h b/mm/internal.h index 3756dd5d2c92..98b97cb5a97b 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -737,4 +737,9 @@ int numa_migrate_prep(struct page *page, struct vm_area_struct *vma, void free_zone_device_page(struct page *page); +/* + * mm/gup.c + */ +struct folio *try_grab_folio(struct page *page, int refs, unsigned int flags); + #endif /* __MM_INTERNAL_H */ -- cgit v1.2.3