]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: confirm dotdot target before replacing it during a repair
authorDarrick J. Wong <djwong@kernel.org>
Mon, 23 Sep 2024 20:41:04 +0000 (13:41 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 9 Oct 2024 02:25:24 +0000 (19:25 -0700)
commitceec177bfca49171df23f44c0d6ea8c174b87a84
treef2ea52367f5bad03bc26558c168b6594c201ec18
parent046f6f681ebc20c6882f9d212fde330b4b0e2cd3
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