mm/gup: Convert try_grab_page() to use a folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Fri, 4 Feb 2022 15:32:01 +0000 (10:32 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Thu, 17 Feb 2022 22:05:52 +0000 (17:05 -0500)
commit944bdd6fa01583ba8b6fd8f9e8658c5332d5ba62
treea11f40076900e29517a9466d8117a760fb8354f7
parent06fae5411d3c1603358c31700ace74fec5af599a
mm/gup: Convert try_grab_page() to use a folio

Hoist the folio conversion and the folio_ref_count() check to the
top of the function instead of using the one buried in try_get_page().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
mm/gup.c