xfs: update the unlinked list when repairing link counts
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:49 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:58:55 +0000 (14:58 -0700)
commit669dfe883c8e20231495f80a28ec7cc0b8fdddc4
tree7d020f35c8b000987052d0dfd4f8d6e7d8086bb7
parente921533ef1a610ae92319269bd8e41ab09bf09c4
xfs: update the unlinked list when repairing link counts

When we're repairing the link counts of a file, we must ensure either
that the file has zero link count and is on the unlinked list; or that
it has nonzero link count and is not on the unlinked list.

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