summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-03-17 09:27:17 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-03-25 17:08:55 -0700
commit8e45025becb250087a4bb20e82f549a9297ec15f (patch)
tree1b2472d66b9acd7895fc9a8249fac538f01dcd2d /fs/xfs/xfs_super.c
parentf8fc5b1afb08260b6f758fcad67892fca0b4bd93 (diff)
xfs: teach scrub to check file nlinks
Copy-pasta the online quotacheck code to check inode link counts too. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index efad38847230..0ac13183524f 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1976,6 +1976,10 @@ static int xfs_init_fs_context(
mp->m_logbsize = -1;
mp->m_allocsize_log = 16; /* 64k */
+#if IS_ENABLED(CONFIG_XFS_ONLINE_SCRUB)
+ xfs_hook_init(&mp->m_nlink_mod_hooks);
+#endif
+
/*
* Copy binary VFS mount flags we are interested in.
*/