diff options
author | Christoph Hellwig <hch@lst.de> | 2021-04-13 11:15:09 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-04-15 09:35:50 -0700 |
commit | 862a804aae3031e91bd0ae0b13c90a1b13d77af3 (patch) | |
tree | 4f1a04acd49851169c01326b6ed2aaa6fb75143c /fs/xfs/scrub/bmap.c | |
parent | e7a3d7e792a5ad50583a2e6c35e72bd2ca6096f4 (diff) | |
download | lwn-862a804aae3031e91bd0ae0b13c90a1b13d77af3.tar.gz lwn-862a804aae3031e91bd0ae0b13c90a1b13d77af3.zip |
xfs: move the XFS_IFEXTENTS check into xfs_iread_extents
Move the XFS_IFEXTENTS check from the callers into xfs_iread_extents to
simplify the code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/bmap.c')
-rw-r--r-- | fs/xfs/scrub/bmap.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c index 613e2aa7e4e7..924d7e343731 100644 --- a/fs/xfs/scrub/bmap.c +++ b/fs/xfs/scrub/bmap.c @@ -448,11 +448,10 @@ xchk_bmap_btree( /* Load the incore bmap cache if it's not loaded. */ info->was_loaded = ifp->if_flags & XFS_IFEXTENTS; - if (!info->was_loaded) { - error = xfs_iread_extents(sc->tp, ip, whichfork); - if (!xchk_fblock_process_error(sc, whichfork, 0, &error)) - goto out; - } + + error = xfs_iread_extents(sc->tp, ip, whichfork); + if (!xchk_fblock_process_error(sc, whichfork, 0, &error)) + goto out; /* Check the btree structure. */ cur = xfs_bmbt_init_cursor(mp, sc->tp, ip, whichfork); |