summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_symlink.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-02-22 12:30:59 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-02-22 12:30:59 -0800
commit86a1746eea91c6db983e6ccd3f846708746e47c2 (patch)
treef87d26a712713a787e7c9e058f150d5dc5194b3f /fs/xfs/xfs_symlink.c
parentf1184081ac97625d30c59851944f4c59ae7ddc2b (diff)
downloadlinux-86a1746eea91c6db983e6ccd3f846708746e47c2.tar.gz
linux-86a1746eea91c6db983e6ccd3f846708746e47c2.tar.bz2
linux-86a1746eea91c6db983e6ccd3f846708746e47c2.zip
xfs: track directory entry updates during live nlinks fsck
Create the necessary hooks in the directory operations (create/link/unlink/rename) code so that our live nlink scrub code can stay up to date with link count updates in the rest of the filesystem. This will be the means to keep our shadow link count information up to date while the scan runs in real time. In online fsck part 2, we'll use these same hooks to handle repairs to directories and parent pointer information. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_symlink.c')
-rw-r--r--fs/xfs/xfs_symlink.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c
index c2dc8c501bdc..e73692fbe179 100644
--- a/fs/xfs/xfs_symlink.c
+++ b/fs/xfs/xfs_symlink.c
@@ -322,6 +322,7 @@ xfs_symlink(
goto out_trans_cancel;
xfs_trans_ichgtime(tp, dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
xfs_trans_log_inode(tp, dp, XFS_ILOG_CORE);
+ xfs_dir_update_hook(dp, ip, 1, link_name);
/*
* If this is a synchronous mount, make sure that the