xfs: flag inode corruption if parent ptr doesn't get us a real inode
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 23 Mar 2018 17:06:56 +0000 (10:06 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sat, 24 Mar 2018 01:05:08 +0000 (18:05 -0700)
commit5927268f5a04c3b25683e52a0017aa5a9e8eee70
treefb59f975e5b95f2b540d4f99de531c4c0a2832e5
parent6a96c5650568a2218712d43ec16f3f82296a6c53
xfs: flag inode corruption if parent ptr doesn't get us a real inode

If a directory's parent inode pointer doesn't point to an inode, the
directory should be flagged as corrupt.  Enable IGET_UNTRUSTED here so
that _iget will return -EINVAL if the inobt does not confirm that the
inode is present and allocated and we can flag the directory corruption.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/scrub/parent.c