summaryrefslogtreecommitdiffstats
path: root/fs/zonefs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2025-07-10 15:33:26 +0200
committerChristian Brauner <brauner@kernel.org>2025-07-14 10:51:31 +0200
commit67fd9615a782b11cd0c62823d722a815c9e1eb75 (patch)
treeb357562d0c6083e5188f26cd3829532ccd11ea83 /fs/zonefs
parentiomap: header diet (diff)
downloadlinux-67fd9615a782b11cd0c62823d722a815c9e1eb75.tar.gz
linux-67fd9615a782b11cd0c62823d722a815c9e1eb75.zip
iomap: pass more arguments using the iomap writeback context
Add inode and wpc fields to pass the inode and writeback context that are needed in the entire writeback call chain, and let the callers initialize all fields in the writeback context before calling iomap_writepages to simplify the argument passing. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/20250710133343.399917-3-hch@lst.de Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Joanne Koong <joannelkoong@gmail.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/zonefs')
-rw-r--r--fs/zonefs/file.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/zonefs/file.c b/fs/zonefs/file.c
index 42e2c0065bb3..edca4bbe4b72 100644
--- a/fs/zonefs/file.c
+++ b/fs/zonefs/file.c
@@ -152,9 +152,13 @@ static const struct iomap_writeback_ops zonefs_writeback_ops = {
static int zonefs_writepages(struct address_space *mapping,
struct writeback_control *wbc)
{
- struct iomap_writepage_ctx wpc = { };
+ struct iomap_writepage_ctx wpc = {
+ .inode = mapping->host,
+ .wbc = wbc,
+ .ops = &zonefs_writeback_ops,
+ };
- return iomap_writepages(mapping, wbc, &wpc, &zonefs_writeback_ops);
+ return iomap_writepages(&wpc);
}
static int zonefs_swap_activate(struct swap_info_struct *sis,