summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorJason Gunthorpe <jgg@nvidia.com>2023-01-24 21:34:25 +0100
committerAndrew Morton <akpm@linux-foundation.org>2023-02-10 01:51:44 +0100
commit7ce154fe6917e7db94d63bc4d6c73b678ad1c581 (patch)
treed3ff29d566f48645cf2b654dfce96e9297464e6a /mm
parentmm/gup: don't call __gup_longterm_locked() if FOLL_LONGTERM cannot be set (diff)
downloadlinux-7ce154fe6917e7db94d63bc4d6c73b678ad1c581.tar.xz
linux-7ce154fe6917e7db94d63bc4d6c73b678ad1c581.zip
mm/gup: move try_grab_page() to mm/internal.h
This is part of the internal function of gup.c and is only non-static so that the parts of gup.c in the huge_memory.c and hugetlb.c can call it. Put it in internal.h beside the similarly purposed try_grab_folio() Link: https://lkml.kernel.org/r/4-v2-987e91b59705+36b-gup_tidy_jgg@nvidia.com Signed-off-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: John Hubbard <jhubbard@nvidia.com> Cc: Alistair Popple <apopple@nvidia.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Claudio Imbrenda <imbrenda@linux.ibm.com> Cc: David Hildenbrand <david@redhat.com> Cc: David Howells <dhowells@redhat.com> Cc: Mike Rapoport (IBM) <rppt@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/internal.h b/mm/internal.h
index 90bb2078444c..3f75763b0fc2 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -856,6 +856,7 @@ int migrate_device_coherent_page(struct page *page);
* mm/gup.c
*/
struct folio *try_grab_folio(struct page *page, int refs, unsigned int flags);
+int __must_check try_grab_page(struct page *page, unsigned int flags);
extern bool mirrored_kernelcore;