summaryrefslogtreecommitdiffstats
path: root/mm/internal.h
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-02-04 16:27:40 +0100
committerMatthew Wilcox (Oracle) <willy@infradead.org>2022-03-21 17:56:35 +0100
commitece1ed7bfa1208b527b3dc90bb45c55e0d139a88 (patch)
tree2e842c73049d93126fe1fbbd16cd72cd5eacbc97 /mm/internal.h
parentmm: Turn page_maybe_dma_pinned() into folio_maybe_dma_pinned() (diff)
downloadlinux-ece1ed7bfa1208b527b3dc90bb45c55e0d139a88.tar.xz
linux-ece1ed7bfa1208b527b3dc90bb45c55e0d139a88.zip
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) <willy@infradead.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: John Hubbard <jhubbard@nvidia.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: William Kucharski <william.kucharski@oracle.com>
Diffstat (limited to 'mm/internal.h')
-rw-r--r--mm/internal.h5
1 files changed, 5 insertions, 0 deletions
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 */