]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
xfs: mark dir corrupt when lookup-by-hash fails
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 11 Mar 2020 17:37:57 +0000 (10:37 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 9 Nov 2020 13:47:38 +0000 (14:47 +0100)
commit04dea862e1e755cee83192de24c54bd546b7c849
tree55b5bedb6a359c3f39232b700083607c2eff057f
parentc6a3e496783855e752778eb46cf41250ff6c99c3
xfs: mark dir corrupt when lookup-by-hash fails

BugLink: https://bugs.launchpad.net/bugs/1900624
[ Upstream commit 2e107cf869eecc770e3f630060bb4e5f547d0fd8 ]

In xchk_dir_actor, we attempt to validate the directory hash structures
by performing a directory entry lookup by (hashed) name.  If the lookup
returns ENOENT, that means that the hash information is corrupt.  The
_process_error functions don't catch this, so we have to add that
explicitly.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Ian May <ian.may@canonical.com>
fs/xfs/scrub/dir.c