filemap: Add folio_put_wait_locked()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 17 Aug 2021 03:36:31 +0000 (23:36 -0400)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 4 Jan 2022 18:15:33 +0000 (13:15 -0500)
commit9f2b04a25a41b1f41b3cead4f56854a4192ec5b0
tree27f4d1ed8d4626e3bf9938c1e768eefdc4e4bfd9
parent5bf34d7c7ffe773c3b3c1b6ebf39e0f34a2436ec
filemap: Add folio_put_wait_locked()

Convert all three callers of put_and_wait_on_page_locked() to
folio_put_wait_locked().  This shrinks the kernel overall by 19 bytes.
filemap_update_page() shrinks by 19 bytes while __migration_entry_wait()
is unchanged.  folio_put_wait_locked() is 14 bytes smaller than
put_and_wait_on_page_locked(), but pmd_migration_entry_wait() grows by
14 bytes.  It removes the assumption from pmd_migration_entry_wait()
that pages cannot be larger than a PMD (which is true today, but
may be interesting to explore in the future).

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: William Kucharski <william.kucharski@oracle.com>
include/linux/pagemap.h
mm/filemap.c
mm/migrate.c