Convert zonefs iomap_ops to the new ->iomap_next() callback. This uses the iomap_process() helper, which finishes the previous mapping if needed and produces the next one. No functional changes are intended. Signed-off-by: Joanne Koong --- fs/zonefs/file.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/fs/zonefs/file.c b/fs/zonefs/file.c index 5ada33f70bb4..a29a8756d660 100644 --- a/fs/zonefs/file.c +++ b/fs/zonefs/file.c @@ -57,8 +57,15 @@ static int zonefs_read_iomap_begin(struct inode *inode, loff_t offset, return 0; } +static int zonefs_read_iomap_next(const struct iomap_iter *iter, + struct iomap *iomap, struct iomap *srcmap) +{ + return iomap_process(iter, iomap, srcmap, zonefs_read_iomap_begin, + NULL); +} + static const struct iomap_ops zonefs_read_iomap_ops = { - .iomap_begin = zonefs_read_iomap_begin, + .iomap_next = zonefs_read_iomap_next, }; static int zonefs_write_iomap_begin(struct inode *inode, loff_t offset, @@ -106,8 +113,15 @@ static int zonefs_write_iomap_begin(struct inode *inode, loff_t offset, return 0; } +static int zonefs_write_iomap_next(const struct iomap_iter *iter, + struct iomap *iomap, struct iomap *srcmap) +{ + return iomap_process(iter, iomap, srcmap, zonefs_write_iomap_begin, + NULL); +} + static const struct iomap_ops zonefs_write_iomap_ops = { - .iomap_begin = zonefs_write_iomap_begin, + .iomap_next = zonefs_write_iomap_next, }; static int zonefs_read_folio(struct file *unused, struct folio *folio) -- 2.52.0