aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_inode_buf.c
diff options
context:
space:
mode:
authorGravatar Darrick J. Wong <darrick.wong@oracle.com> 2019-02-07 10:37:13 -0800
committerGravatar Darrick J. Wong <darrick.wong@oracle.com> 2019-02-11 16:07:01 -0800
commit7d36c19538d38f9ff6b93d2a3d23ee879b076dc6 (patch)
treefe8bf04bddb297059e7db80126f9db0bb63a31e2 /fs/xfs/libxfs/xfs_inode_buf.c
parentxfs: clean up iunlink functions (diff)
downloadlinux-7d36c19538d38f9ff6b93d2a3d23ee879b076dc6.tar.gz
linux-7d36c19538d38f9ff6b93d2a3d23ee879b076dc6.tar.bz2
linux-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.c3
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) {