From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> Remove the _ABORT code since nobody uses it and we're slowly moving to ECANCELED anyway. Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --- scrub/inodes.c | 2 +- scrub/inodes.h | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scrub/inodes.c b/scrub/inodes.c index a2aa6384..7b3284db 100644 --- a/scrub/inodes.c +++ b/scrub/inodes.c @@ -187,7 +187,7 @@ scan_ag_inodes( _("Changed too many times during scan; giving up.")); break; } - case XFS_ITERATE_INODES_ABORT: + case ECANCELED: error = 0; /* fall thru */ default: diff --git a/scrub/inodes.h b/scrub/inodes.h index 3affaa00..f0318045 100644 --- a/scrub/inodes.h +++ b/scrub/inodes.h @@ -10,12 +10,13 @@ * Visit each space mapping of an inode fork. Return 0 to continue iteration * or a positive error code to interrupt iteraton. If ESTALE is returned, * iteration will be restarted from the beginning of the inode allocation - * group. Any other non zero value will stop iteration. + * group. Any other non zero value will stop iteration. The special return + * value ECANCELED can be used to stop iteration, because the inode iteration + * function never generates that error code on its own. */ typedef int (*scrub_inode_iter_fn)(struct scrub_ctx *ctx, struct xfs_handle *handle, struct xfs_bulkstat *bs, void *arg); -#define XFS_ITERATE_INODES_ABORT (-1) int scrub_scan_all_inodes(struct scrub_ctx *ctx, scrub_inode_iter_fn fn, void *arg);