[PATCH v2 12/18] gfs2: convert iomap ops to ->iomap_next()

From: Joanne Koong

Date: Tue Jun 30 2026 - 20:15:55 EST


Convert gfs2 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 <joannelkoong@xxxxxxxxx>
---
fs/gfs2/bmap.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 51ac1fd44f78..6cb1d4513882 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -1200,9 +1200,15 @@ static int gfs2_iomap_end(struct inode *inode, loff_t pos, loff_t length,
return 0;
}

+static int gfs2_iomap_next(const struct iomap_iter *iter, struct iomap *iomap,
+ struct iomap *srcmap)
+{
+ return iomap_process(iter, iomap, srcmap, gfs2_iomap_begin,
+ gfs2_iomap_end);
+}
+
const struct iomap_ops gfs2_iomap_ops = {
- .iomap_begin = gfs2_iomap_begin,
- .iomap_end = gfs2_iomap_end,
+ .iomap_next = gfs2_iomap_next,
};

/**
--
2.52.0