Skip to content

Commit 8b217cf

Browse files
Christoph Hellwigbrauner
authored andcommitted
iomap: export iomap_writeback_folio
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 <[email protected]> Link: https://lore.kernel.org/[email protected] Reviewed-by: Joanne Koong <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent f8b6a94 commit 8b217cf

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

fs/iomap/buffered-io.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1634,8 +1634,7 @@ static bool iomap_writeback_handle_eof(struct folio *folio, struct inode *inode,
16341634
return true;
16351635
}
16361636

1637-
static int iomap_writeback_folio(struct iomap_writepage_ctx *wpc,
1638-
struct folio *folio)
1637+
int iomap_writeback_folio(struct iomap_writepage_ctx *wpc, struct folio *folio)
16391638
{
16401639
struct iomap_folio_state *ifs = folio->private;
16411640
struct inode *inode = wpc->inode;
@@ -1717,6 +1716,7 @@ static int iomap_writeback_folio(struct iomap_writepage_ctx *wpc,
17171716
mapping_set_error(inode->i_mapping, error);
17181717
return error;
17191718
}
1719+
EXPORT_SYMBOL_GPL(iomap_writeback_folio);
17201720

17211721
int
17221722
iomap_writepages(struct iomap_writepage_ctx *wpc)

include/linux/iomap.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ void iomap_start_folio_write(struct inode *inode, struct folio *folio,
466466
void iomap_finish_folio_write(struct inode *inode, struct folio *folio,
467467
size_t len);
468468

469+
int iomap_writeback_folio(struct iomap_writepage_ctx *wpc, struct folio *folio);
469470
int iomap_writepages(struct iomap_writepage_ctx *wpc);
470471

471472
/*

0 commit comments

Comments
 (0)