diff options
author | 2019-02-07 10:37:13 -0800 | |
---|---|---|
committer | 2019-02-11 16:07:01 -0800 | |
commit | 7d36c19538d38f9ff6b93d2a3d23ee879b076dc6 (patch) | |
tree | fe8bf04bddb297059e7db80126f9db0bb63a31e2 /fs/xfs/libxfs/xfs_inode_buf.c | |
parent | xfs: clean up iunlink functions (diff) | |
download | linux-rng-7d36c19538d38f9ff6b93d2a3d23ee879b076dc6.tar.xz linux-rng-7d36c19538d38f9ff6b93d2a3d23ee879b076dc6.zip |
xfs: add xfs_verify_agino_or_null helper
Add a new helper to check that a per-AG inode pointer is either null or
points somewhere valid within that AG.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_buf.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_inode_buf.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c index 09d9c8cfa4a0..82c4374acb4c 100644 --- a/fs/xfs/libxfs/xfs_inode_buf.c +++ b/fs/xfs/libxfs/xfs_inode_buf.c @@ -99,8 +99,7 @@ xfs_inode_buf_verify( unlinked_ino = be32_to_cpu(dip->di_next_unlinked); di_ok = dip->di_magic == cpu_to_be16(XFS_DINODE_MAGIC) && xfs_dinode_good_version(mp, dip->di_version) && - (unlinked_ino == NULLAGINO || - xfs_verify_agino(mp, agno, unlinked_ino)); + xfs_verify_agino_or_null(mp, agno, unlinked_ino); if (unlikely(XFS_TEST_ERROR(!di_ok, mp, XFS_ERRTAG_ITOBP_INOTOBP))) { if (readahead) { |