summaryrefslogtreecommitdiff
path: root/include/linux/bnge/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorJoanne Koong <joannelkoong@gmail.com>2026-07-29 12:27:17 -0700
committerChristian Brauner <brauner@kernel.org>2026-07-31 12:28:48 +0200
commit19eb9f6ab5ce1d15c7f5e48ca16804a6d7740084 (patch)
tree0e3c8f066de0fb46988703364841852a8bd694b6 /include/linux/bnge/git@git.tavy.me:linux.git
parent31e3d833d522746a93d135e8b465d16f8ad33453 (diff)
iomap: split iomap_iter() logic into iomap_iter_next()
In preparation for changing iomap to use an in-iter (->iomap_next()) model, move the iomap_iter() logic out into the new iomap_iter_next() helper function. iomap_iter_next() is added as an inlined helper so it can be called directly by ->iomap_next() implementations where the begin()/end() callbacks can be direct calls. The DEFINE_IOMAP_ITER_NEXT() and DEFINE_IOMAP_ITER_NEXT_END() macros are also provided to generate the boilerplate ->iomap_next() wrapper functions that simply forward to iomap_iter_next() with the appropriate begin/end callbacks. DEFINE_IOMAP_ITER_NEXT() is for the common case where there is no end() callback. DEFINE_IOMAP_ITER_NEXT_END() is for the case where there is an explicit end() callback. No functional change intended. The one would-be behavioral difference is that on the iomap_end() error path (ret < 0 && !advanced), the old code returned with iter.status left as the caller's last value whereas the new code zeroes it, but this is not observable in practice as there are no in-tree callers that read iter.status after the iteration loop. Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Fengnan Chang <changfengnan@bytedance.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Joanne Koong <joannelkoong@gmail.com> Link: https://patch.msgid.link/20260729192737.3190206-3-joannelkoong@gmail.com Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'include/linux/bnge/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions