xfs: ensure unlinked list state is consistent with nlink during scrub
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:54 +0000 (14:58 -0700)
commite921533ef1a610ae92319269bd8e41ab09bf09c4
treeda55b96adfa7f80935f7342f7909a59a22d2fa28
parent6c631e79e73c7122c890ef943f8ca9aab9e1dec8
xfs: ensure unlinked list state is consistent with nlink during scrub

Now that we have the means to tell if an inode is on an unlinked inode
list or not, we can check that an inode with zero link count is on the
unlinked list; and an inode that has nonzero link count is not on that
list.  Make repair clean things up too.

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