]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
zonefs: convert iomap ops to ->iomap_next()
authorJoanne Koong <joannelkoong@gmail.com>
Wed, 29 Jul 2026 19:27:27 +0000 (12:27 -0700)
committerChristian Brauner <brauner@kernel.org>
Fri, 31 Jul 2026 10:28:50 +0000 (12:28 +0200)
Convert zonefs iomap_ops to the new ->iomap_next() callback. Each
callback is generated with the DEFINE_IOMAP_ITER_NEXT() macro, which
wraps the iomap_iter_next() helper to finish the previous mapping if
needed and produce the next one. No functional changes are intended.

Acked-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Link: https://patch.msgid.link/20260729192737.3190206-13-joannelkoong@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/zonefs/file.c

index 5ada33f70bb4714cab1252d173291bd59cda9308..5b34849be7a2c70f64f758ad38bf6001350a6fbc 100644 (file)
@@ -57,8 +57,10 @@ static int zonefs_read_iomap_begin(struct inode *inode, loff_t offset,
        return 0;
 }
 
+static DEFINE_IOMAP_ITER_NEXT(zonefs_read_iomap_next, zonefs_read_iomap_begin);
+
 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 +108,11 @@ static int zonefs_write_iomap_begin(struct inode *inode, loff_t offset,
        return 0;
 }
 
+static DEFINE_IOMAP_ITER_NEXT(zonefs_write_iomap_next,
+                             zonefs_write_iomap_begin);
+
 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)