Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xfs: remove all *_ITER_CONTINUE values

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 <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>

+8 -14
-1
fs/xfs/libxfs/xfs_btree.h
··· 471 471 * used to stop iteration, because _query_range never generates that error 472 472 * code on its own. 473 473 */ 474 - #define XFS_BTREE_QUERY_RANGE_CONTINUE (XFS_ITER_CONTINUE) /* keep iterating */ 475 474 typedef int (*xfs_btree_query_range_fn)(struct xfs_btree_cur *cur, 476 475 union xfs_btree_rec *rec, void *priv); 477 476
+4 -4
fs/xfs/libxfs/xfs_rmap.c
··· 253 253 rec->rm_flags); 254 254 255 255 if (rec->rm_owner != info->high.rm_owner) 256 - return XFS_BTREE_QUERY_RANGE_CONTINUE; 256 + return 0; 257 257 if (!XFS_RMAP_NON_INODE_OWNER(rec->rm_owner) && 258 258 !(rec->rm_flags & XFS_RMAP_BMBT_BLOCK) && 259 259 rec->rm_offset + rec->rm_blockcount - 1 != info->high.rm_offset) 260 - return XFS_BTREE_QUERY_RANGE_CONTINUE; 260 + return 0; 261 261 262 262 *info->irec = *rec; 263 263 *info->stat = 1; ··· 329 329 rec->rm_flags); 330 330 331 331 if (rec->rm_owner != info->high.rm_owner) 332 - return XFS_BTREE_QUERY_RANGE_CONTINUE; 332 + return 0; 333 333 if (!XFS_RMAP_NON_INODE_OWNER(rec->rm_owner) && 334 334 !(rec->rm_flags & XFS_RMAP_BMBT_BLOCK) && 335 335 (rec->rm_offset > info->high.rm_offset || 336 336 rec->rm_offset + rec->rm_blockcount <= info->high.rm_offset)) 337 - return XFS_BTREE_QUERY_RANGE_CONTINUE; 337 + return 0; 338 338 339 339 *info->irec = *rec; 340 340 *info->stat = 1;
-3
fs/xfs/libxfs/xfs_shared.h
··· 177 177 unsigned int agino_log; /* #bits for agino in inum */ 178 178 }; 179 179 180 - /* Keep iterating the data structure. */ 181 - #define XFS_ITER_CONTINUE (0) 182 - 183 180 #endif /* __XFS_SHARED_H__ */
+4 -4
fs/xfs/xfs_fsmap.c
··· 250 250 rec_daddr += XFS_FSB_TO_BB(mp, rec->rm_blockcount); 251 251 if (info->next_daddr < rec_daddr) 252 252 info->next_daddr = rec_daddr; 253 - return XFS_BTREE_QUERY_RANGE_CONTINUE; 253 + return 0; 254 254 } 255 255 256 256 /* Are we just counting mappings? */ ··· 259 259 info->head->fmh_entries++; 260 260 261 261 if (info->last) 262 - return XFS_BTREE_QUERY_RANGE_CONTINUE; 262 + return 0; 263 263 264 264 info->head->fmh_entries++; 265 265 266 266 rec_daddr += XFS_FSB_TO_BB(mp, rec->rm_blockcount); 267 267 if (info->next_daddr < rec_daddr) 268 268 info->next_daddr = rec_daddr; 269 - return XFS_BTREE_QUERY_RANGE_CONTINUE; 269 + return 0; 270 270 } 271 271 272 272 /* ··· 328 328 rec_daddr += XFS_FSB_TO_BB(mp, rec->rm_blockcount); 329 329 if (info->next_daddr < rec_daddr) 330 330 info->next_daddr = rec_daddr; 331 - return XFS_BTREE_QUERY_RANGE_CONTINUE; 331 + return 0; 332 332 } 333 333 334 334 /* Transform a rmapbt irec into a fsmap */
-2
fs/xfs/xfs_iwalk.h
··· 17 17 /* Walk all inodes in the filesystem starting from @startino. */ 18 18 typedef int (*xfs_iwalk_fn)(struct xfs_mount *mp, struct xfs_trans *tp, 19 19 xfs_ino_t ino, void *data); 20 - /* Return values for xfs_iwalk_fn. */ 21 - #define XFS_IWALK_CONTINUE (XFS_ITER_CONTINUE) 22 20 23 21 int xfs_iwalk(struct xfs_mount *mp, struct xfs_trans *tp, xfs_ino_t startino, 24 22 unsigned int flags, xfs_iwalk_fn iwalk_fn,