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>
Mon, 21 Mar 2022 16:56:35 +0000 (12:56 -0400)
commit5fec0719908bdabdf9d017b0f488d18019ed00f7
tree4ac37310bdb363402f898ac7b9bd20b7fbad8200
parentece1ed7bfa1208b527b3dc90bb45c55e0d139a88
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