Re: [PATCH 09/12] iomap: export iomap_writeback_folio

Darrick J. Wong
2025-07-02T18:27:16Z

On Fri, Jun 27, 2025 at 09:02:42AM +0200, Christoph Hellwig wrote:
> Allow fuse to use iomap_writeback_folio for folio laundering. Note
> that the caller needs to manually submit the pending writeback context.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Reviewed-by: Joanne Koong <joannelkoong@gmail.com>

Seems reasonable to me...
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
> fs/iomap/buffered-io.c | 4 ++--
> include/linux/iomap.h | 1 +
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
> index a1dccf4e7063..18ae896bcfcc 100644
> --- a/fs/iomap/buffered-io.c
> +++ b/fs/iomap/buffered-io.c
> @@ -1638,8 +1638,7 @@ static bool iomap_writeback_handle_eof(struct folio *folio, struct inode *inode,
> return true;
> }
>
> -static int iomap_writeback_folio(struct iomap_writeback_ctx *wpc,
> - struct folio *folio)
> +int iomap_writeback_folio(struct iomap_writeback_ctx *wpc, struct folio *folio)
> {
> struct iomap_folio_state *ifs = folio->private;
> struct inode *inode = wpc->inode;
> @@ -1721,6 +1720,7 @@ static int iomap_writeback_folio(struct iomap_writeback_ctx *wpc,
> mapping_set_error(inode->i_mapping, error);
> return error;
> }
> +EXPORT_SYMBOL_GPL(iomap_writeback_folio);
>
> int
> iomap_writepages(struct iomap_writeback_ctx *wpc)
> diff --git a/include/linux/iomap.h b/include/linux/iomap.h
> index 1a07d8fa9459..568a246f949b 100644
> --- a/include/linux/iomap.h
> +++ b/include/linux/iomap.h
> @@ -465,6 +465,7 @@ void iomap_start_folio_write(struct inode *inode, struct folio *folio,
> size_t len);
> void iomap_finish_folio_write(struct inode *inode, struct folio *folio,
> size_t len);
> +int iomap_writeback_folio(struct iomap_writeback_ctx *wpc, struct folio *folio);
> int iomap_writepages(struct iomap_writeback_ctx *wpc);
>
> /*
> --
> 2.47.2
>
>