# Re: \[PATCH v14 025/138\] mm/writeback: Add folio\_wait\_writeback()

- From: Mike Rapoport \<rppt@kernel.org\>
- Date: 2021-07-20 10:47:36 
- List: linux-mm
- Page: https://ratatoskr.run/linux-mm/2021/07/210569
- Thread: https://ratatoskr.run/linux-mm/2021/07/209943/t/3.md

```text
On Thu, Jul 15, 2021 at 04:35:11AM +0100, Matthew Wilcox (Oracle) wrote:
> wait_on_page_writeback_killable() only has one caller, so convert it to
> call folio_wait_writeback_killable().  For the wait_on_page_writeback()
> callers, add a compatibility wrapper around folio_wait_writeback().
> 
> Turning PageWriteback() into folio_test_writeback() eliminates a call
> to compound_head() which saves 8 bytes and 15 bytes in the two
> functions.  Unfortunately, that is more than offset by adding the
> wait_on_page_writeback compatibility wrapper for a net increase in text
> of 7 bytes.
> 
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Acked-by: Jeff Layton <jlayton@kernel.org>
> Acked-by: Kirill A. Shutemov <redacted>
> Acked-by: Vlastimil Babka <redacted>
> Reviewed-by: William Kucharski <redacted>
> ---
>  fs/afs/write.c          |  9 ++++----
>  include/linux/pagemap.h |  3 ++-
>  mm/folio-compat.c       |  6 ++++++
>  mm/page-writeback.c     | 48 ++++++++++++++++++++++++++++-------------
>  4 files changed, 46 insertions(+), 20 deletions(-)

Acked-by: Mike Rapoport <redacted>

```
