]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: confirm dotdot target before replacing it during a repair
authorDarrick J. Wong <djwong@kernel.org>
Mon, 4 Nov 2024 04:19:02 +0000 (20:19 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 5 Nov 2024 21:38:34 +0000 (13:38 -0800)
commit87b7c205da8a7d90958c7e64fe5014a1d2f06b63
tree87ba775db15b7c487defdbe54e65be3a10160efb
parentb3c03efa5972f084e40104307dbe432359279cf2
xfs: confirm dotdot target before replacing it during a repair

xfs_dir_replace trips an assertion if you tell it to change a dirent to
point to an inumber that it already points at.  Look up the dotdot entry
directly to confirm that we need to make a change.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/dir_repair.c