xfs: clean up long conditionals in xfs_iwalk_ichunk_ra

Refactor xfs_iwalk_ichunk_ra to avoid long conditionals.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
Darrick J. Wong 2019-07-02 09:39:42 -07:00
parent 5e29f3b720
commit 688f7c3678
1 changed files with 6 additions and 6 deletions

View File

@ -83,16 +83,16 @@ xfs_iwalk_ichunk_ra(
agbno = XFS_AGINO_TO_AGBNO(mp, irec->ir_startino);
blk_start_plug(&plug);
for (i = 0;
i < XFS_INODES_PER_CHUNK;
i += igeo->inodes_per_cluster,
agbno += igeo->blocks_per_cluster) {
if (xfs_inobt_maskn(i, igeo->inodes_per_cluster) &
~irec->ir_free) {
for (i = 0; i < XFS_INODES_PER_CHUNK; i += igeo->inodes_per_cluster) {
xfs_inofree_t imask;
imask = xfs_inobt_maskn(i, igeo->inodes_per_cluster);
if (imask & ~irec->ir_free) {
xfs_btree_reada_bufs(mp, agno, agbno,
igeo->blocks_per_cluster,
&xfs_inode_buf_ops);
}
agbno += igeo->blocks_per_cluster;
}
blk_finish_plug(&plug);
}