[PATCH 08/11] xfs: clean up long conditionals in xfs_iwalk_ichunk_ra

Darrick J. Wong
2019-05-29T22:27:08Z

Refactor xfs_iwalk_ichunk_ra to avoid long conditionals.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
fs/xfs/xfs_iwalk.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_iwalk.c b/fs/xfs/xfs_iwalk.c
index 8e7881e95674..3c523afdcfa0 100644
--- a/fs/xfs/xfs_iwalk.c
+++ b/fs/xfs/xfs_iwalk.c
@@ -76,8 +76,10 @@ xfs_iwalk_ichunk_ra(
i < XFS_INODES_PER_CHUNK;
i += igeo->ig_inodes_per_cluster,
agbno += igeo->ig_blocks_per_cluster) {
- if (xfs_inobt_maskn(i, igeo->ig_inodes_per_cluster) &
- ~irec->ir_free) {
+ xfs_inofree_t imask;
+
+ imask = xfs_inobt_maskn(i, igeo->ig_inodes_per_cluster);
+ if (imask & ~irec->ir_free) {
xfs_btree_reada_bufs(mp, agno, agbno,
igeo->ig_blocks_per_cluster,
&xfs_inode_buf_ops);