OSDN Git Service

mm/writeback: Add folio_write_one
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Tue, 9 Mar 2021 18:48:03 +0000 (13:48 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Mon, 18 Oct 2021 11:49:41 +0000 (07:49 -0400)
commit121703c1c817b3c77f61002466d0bfca7e39f25d
treee71f6e481eec64c9f194fb1203c424bd51b714dc
parentb27652d935f41793c5e229a1e8b3a8bb3afe3cc1
mm/writeback: Add folio_write_one

Transform write_one_page() into folio_write_one() and add a compatibility
wrapper.  Also move the declaration to pagemap.h as this is page cache
functionality that doesn't need to be used by the rest of the kernel.

Saves 58 bytes of kernel text.  While folio_write_one() is 101 bytes
smaller than write_one_page(), the inlined call to page_folio() expands
each caller.  There are fewer than ten callers so it doesn't seem worth
putting a wrapper in the core.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Howells <dhowells@redhat.com>
include/linux/mm.h
include/linux/pagemap.h
mm/page-writeback.c