With all in-tree filesystems implementing ->iomap_next(), drop the ->iomap_begin()/->iomap_end() path. Reviewed-by: Fengnan Chang Reviewed-by: Christoph Hellwig Reviewed-by: "Darrick J. Wong" Signed-off-by: Joanne Koong --- fs/iomap/iter.c | 6 +----- include/linux/iomap.h | 6 ++---- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/fs/iomap/iter.c b/fs/iomap/iter.c index e05574602946..f7c4d5cf56be 100644 --- a/fs/iomap/iter.c +++ b/fs/iomap/iter.c @@ -107,11 +107,7 @@ int iomap_iter(struct iomap_iter *iter, const struct iomap_ops *ops) trace_iomap_iter(iter, ops, _RET_IP_); - if (ops->iomap_next) - ret = ops->iomap_next(iter, &iter->iomap, &iter->srcmap); - else - ret = iomap_iter_next(iter, &iter->iomap, &iter->srcmap, - ops->iomap_begin, ops->iomap_end); + ret = ops->iomap_next(iter, &iter->iomap, &iter->srcmap); iter->status = 0; if (ret > 0) diff --git a/include/linux/iomap.h b/include/linux/iomap.h index d203d9fe0f89..0bc1beb47a09 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -195,7 +195,7 @@ struct iomap_write_ops { }; /* - * Flags for iomap_begin / iomap_end. No flag implies a read. + * Flags for iomap_next. No flag implies a read. */ #define IOMAP_WRITE (1 << 0) /* writing, must allocate blocks */ #define IOMAP_ZERO (1 << 1) /* zeroing operation, may skip holes */ @@ -240,8 +240,6 @@ typedef int (*iomap_iter_next_fn)(const struct iomap_iter *iter, struct iomap *iomap, struct iomap *srcmap); struct iomap_ops { - iomap_iter_begin_fn iomap_begin; - iomap_iter_end_fn iomap_end; iomap_iter_next_fn iomap_next; }; @@ -256,7 +254,7 @@ struct iomap_ops { * incremental iter advance. * @status: Status of the most recent iteration. Zero on success or a negative * errno on error. - * @flags: Zero or more of the iomap_begin flags above. + * @flags: Zero or more of the iomap_next flags above. * @iomap: Map describing the I/O iteration * @srcmap: Source map for COW operations */ -- 2.52.0