diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-08-17 06:36:31 +0300 |
---|---|---|
committer | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-01-04 21:15:33 +0300 |
commit | 9f2b04a25a41b1f41b3cead4f56854a4192ec5b0 (patch) | |
tree | 27f4d1ed8d4626e3bf9938c1e768eefdc4e4bfd9 /include/linux | |
parent | 5bf34d7c7ffe773c3b3c1b6ebf39e0f34a2436ec (diff) | |
download | linux-9f2b04a25a41b1f41b3cead4f56854a4192ec5b0.tar.xz |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/pagemap.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 605246452305..841f7ba62d7d 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -868,7 +868,7 @@ static inline int wait_on_page_locked_killable(struct page *page) return folio_wait_locked_killable(page_folio(page)); } -int put_and_wait_on_page_locked(struct page *page, int state); +int folio_put_wait_locked(struct folio *folio, int state); void wait_on_page_writeback(struct page *page); void folio_wait_writeback(struct folio *folio); int folio_wait_writeback_killable(struct folio *folio); |