[08/11] xfs: clean up long conditionals in xfs_iwalk_ichunk_ra
diff mbox series

Message ID 155916882448.757870.7872177617055446316.stgit@magnolia
State Superseded
Headers show
Series
  • xfs: refactor and improve inode iteration
Related show

Commit Message

Darrick J. Wong May 29, 2019, 10:27 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

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(-)

Patch
diff mbox series

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);