From: Darrick J. Wong Date: Fri, 13 Dec 2019 00:54:33 +0000 (-0500) Subject: xfs: remove all *_ITER_CONTINUE values X-Git-Tag: v5.4.0-rc0~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7dd6dee1a1fc3f2443695a6c30944ec946a3b75e;p=thirdparty%2Fxfsprogs-dev.git xfs: remove all *_ITER_CONTINUE values Source kernel commit: 39ee2239a5a212cbba9d96050bd11cfd0f26634d Iterator functions already use 0 to signal "continue iterating", so get rid of the #defines and just do it directly. Signed-off-by: Darrick J. Wong Reviewed-by: Dave Chinner Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_btree.h b/libxfs/xfs_btree.h index cc2cf6bcc..ff8343b0a 100644 --- a/libxfs/xfs_btree.h +++ b/libxfs/xfs_btree.h @@ -471,7 +471,6 @@ unsigned long long xfs_btree_calc_size(uint *limits, unsigned long long len); * used to stop iteration, because _query_range never generates that error * code on its own. */ -#define XFS_BTREE_QUERY_RANGE_CONTINUE (XFS_ITER_CONTINUE) /* keep iterating */ typedef int (*xfs_btree_query_range_fn)(struct xfs_btree_cur *cur, union xfs_btree_rec *rec, void *priv); diff --git a/libxfs/xfs_rmap.c b/libxfs/xfs_rmap.c index 9129bbd09..cdd6d4019 100644 --- a/libxfs/xfs_rmap.c +++ b/libxfs/xfs_rmap.c @@ -251,11 +251,11 @@ xfs_rmap_find_left_neighbor_helper( rec->rm_flags); if (rec->rm_owner != info->high.rm_owner) - return XFS_BTREE_QUERY_RANGE_CONTINUE; + return 0; if (!XFS_RMAP_NON_INODE_OWNER(rec->rm_owner) && !(rec->rm_flags & XFS_RMAP_BMBT_BLOCK) && rec->rm_offset + rec->rm_blockcount - 1 != info->high.rm_offset) - return XFS_BTREE_QUERY_RANGE_CONTINUE; + return 0; *info->irec = *rec; *info->stat = 1; @@ -327,12 +327,12 @@ xfs_rmap_lookup_le_range_helper( rec->rm_flags); if (rec->rm_owner != info->high.rm_owner) - return XFS_BTREE_QUERY_RANGE_CONTINUE; + return 0; if (!XFS_RMAP_NON_INODE_OWNER(rec->rm_owner) && !(rec->rm_flags & XFS_RMAP_BMBT_BLOCK) && (rec->rm_offset > info->high.rm_offset || rec->rm_offset + rec->rm_blockcount <= info->high.rm_offset)) - return XFS_BTREE_QUERY_RANGE_CONTINUE; + return 0; *info->irec = *rec; *info->stat = 1; diff --git a/libxfs/xfs_shared.h b/libxfs/xfs_shared.h index 2bc31c5a0..c45acbd3a 100644 --- a/libxfs/xfs_shared.h +++ b/libxfs/xfs_shared.h @@ -177,7 +177,4 @@ struct xfs_ino_geometry { unsigned int agino_log; /* #bits for agino in inum */ }; -/* Keep iterating the data structure. */ -#define XFS_ITER_CONTINUE (0) - #endif /* __XFS_SHARED_H__ */