summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDarrick J. Wong2019-07-02 18:39:42 +0200
committerDarrick J. Wong2019-07-02 18:40:06 +0200
commit688f7c367877eaefc4fb130ae30f2e580c22015c (patch)
treed99cabec3882dd303fb47e9609ff172e79d327c0 /fs/xfs
parentxfs: change xfs_iwalk_grab_ichunk to use startino, not lastino (diff)
downloadkernel-qcow2-linux-688f7c367877eaefc4fb130ae30f2e580c22015c.tar.gz
kernel-qcow2-linux-688f7c367877eaefc4fb130ae30f2e580c22015c.tar.xz
kernel-qcow2-linux-688f7c367877eaefc4fb130ae30f2e580c22015c.zip
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>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_iwalk.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/xfs/xfs_iwalk.c b/fs/xfs/xfs_iwalk.c
index 10a96ef6525e..e5249ae02552 100644
--- a/fs/xfs/xfs_iwalk.c
+++ b/fs/xfs/xfs_iwalk.c
@@ -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);
}