mm/filemap: Add filemap_get_folio
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 8 Mar 2021 16:45:35 +0000 (11:45 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 18 Oct 2021 11:49:40 +0000 (07:49 -0400)
commit3f0c6a07fee6a1c2618a2e12ffb8e9aa24384fde
tree7f0d6aa86b8d046fb902a272c48c8e8dc5c78272
parentbca65eeab1db74f83661a49ebdaf87414fc4938e
mm/filemap: Add filemap_get_folio

filemap_get_folio() is a replacement for find_get_page().
Turn pagecache_get_page() into a wrapper around __filemap_get_folio().
Remove find_lock_head() as this use case is now covered by
filemap_get_folio().

Reduces overall kernel size by 209 bytes.  __filemap_get_folio() is
316 bytes shorter than pagecache_get_page() was, but the new
pagecache_get_page() wrapper is 99 bytes.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
include/linux/pagemap.h
mm/filemap.c
mm/folio-compat.c