diff options
| author | Joanne Koong <joannelkoong@gmail.com> | 2025-09-19 14:42:50 -0700 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-10-20 20:21:25 +0200 |
| commit | ca82a7ea2299b4586af1f77daee66ee781202320 (patch) | |
| tree | 866fa9f54101cb813c73be03cd67f74592ee7179 /include | |
| parent | 3a8660878839faadb4f1a6dd72c3179c1df56787 (diff) | |
iomap: simplify iomap_iter_advance()
Most callers of iomap_iter_advance() do not need the remaining length
returned. Get rid of the extra iomap_length() call that
iomap_iter_advance() does.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/iomap.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/iomap.h b/include/linux/iomap.h index 73dceabc21c8..4469b2318b08 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -245,7 +245,7 @@ struct iomap_iter { }; int iomap_iter(struct iomap_iter *iter, const struct iomap_ops *ops); -int iomap_iter_advance(struct iomap_iter *iter, u64 *count); +int iomap_iter_advance(struct iomap_iter *iter, u64 count); /** * iomap_length_trim - trimmed length of the current iomap iteration @@ -282,9 +282,7 @@ static inline u64 iomap_length(const struct iomap_iter *iter) */ static inline int iomap_iter_advance_full(struct iomap_iter *iter) { - u64 length = iomap_length(iter); - - return iomap_iter_advance(iter, &length); + return iomap_iter_advance(iter, iomap_length(iter)); } /** |
