]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ext2: convert iomap ops to ->iomap_next()
authorJoanne Koong <joannelkoong@gmail.com>
Wed, 29 Jul 2026 19:27:28 +0000 (12:27 -0700)
committerChristian Brauner <brauner@kernel.org>
Fri, 31 Jul 2026 10:28:50 +0000 (12:28 +0200)
Convert ext2 iomap_ops to the new ->iomap_next() callback. The callback is
generated with the DEFINE_IOMAP_ITER_NEXT_END() 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.

Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Link: https://patch.msgid.link/20260729192737.3190206-14-joannelkoong@gmail.com
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
fs/ext2/inode.c

index 29808629cce56fd4958e56d962eb1dc2536bd743..7e0fa9c454e15d55a58b108bfdd5f3fad5b8f9a5 100644 (file)
@@ -860,9 +860,11 @@ ext2_iomap_end(struct inode *inode, loff_t offset, loff_t length,
        return 0;
 }
 
+static DEFINE_IOMAP_ITER_NEXT_END(ext2_iomap_next, ext2_iomap_begin,
+                                 ext2_iomap_end);
+
 const struct iomap_ops ext2_iomap_ops = {
-       .iomap_begin            = ext2_iomap_begin,
-       .iomap_end              = ext2_iomap_end,
+       .iomap_next             = ext2_iomap_next,
 };
 
 int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,