]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fix parent pointer scrubber bailing out on unallocated inodes
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 2 Dec 2020 20:25:44 +0000 (12:25 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 9 Dec 2020 17:49:38 +0000 (09:49 -0800)
commit86d7d3190d42fbf3969eec38687e2d77cbc37764
tree3bae3cc858a33d09fff232bb350280c9fd414179
parent1705e95a6967c586dcc43fecdbd0295bdacea39c
xfs: fix parent pointer scrubber bailing out on unallocated inodes

xfs_iget can return -ENOENT for a file that the inobt thinks is
allocated but has zeroed mode.  This currently causes scrub to exit
with an operational error instead of flagging this as a corruption.  The
end result is that scrub mistakenly reports the ENOENT to the user
instead of "directory parent pointer corrupt" like we do for EINVAL.

Fixes: 3890bc1b95de ("xfs: flag inode corruption if parent ptr doesn't get us a real inode")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/parent.c