]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_repair: junk duplicate hashtab entries when processing sf dirents
authorDarrick J. Wong <djwong@kernel.org>
Wed, 3 Jul 2024 21:21:26 +0000 (14:21 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 1 Aug 2024 00:06:23 +0000 (17:06 -0700)
commit7f5febcf97551c20ff28a0e79c2764f2fc1ee7f7
tree17da0f329909f32c9e86b85428d941c97463077d
parent2f01de17f8cabd3a5a2ade7f831a60fa58235f0b
xfs_repair: junk duplicate hashtab entries when processing sf dirents

dir_hash_add() adds the passed-in dirent to the directory hashtab even
if there's already a duplicate.  Therefore, if we detect a duplicate or
a garbage entry while processing the a shortform directory's entries, we
need to junk the newly added entry, just like we do when processing
directory data blocks.

This will become particularly relevant in the next patch, where we
generate a master index of parent pointers from the non-junked hashtab
entries of each directory that phase6 scans.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
repair/phase6.c