aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_dir2.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-02-22 12:30:48 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-02-22 12:30:48 -0800
commite99bfc9e687e208d4ba7e85167b8753e80cf4169 (patch)
tree056bad45becdfe2c355b70cf780cd2c723595e5a /fs/xfs/libxfs/xfs_dir2.c
parentxfs: iscan batching should handle unallocated inodes too (diff)
downloadlinux-e99bfc9e687e208d4ba7e85167b8753e80cf4169.tar.gz
linux-e99bfc9e687e208d4ba7e85167b8753e80cf4169.zip
xfs: create a static name for the dot entry too
Create an xfs_name_dot object so that upcoming scrub code can compare against that. Offline repair already has such an object, so we're really just hoisting it to the kernel. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2.c')
-rw-r--r--fs/xfs/libxfs/xfs_dir2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2.c b/fs/xfs/libxfs/xfs_dir2.c
index 8c9403b33191..9018abb38d7f 100644
--- a/fs/xfs/libxfs/xfs_dir2.c
+++ b/fs/xfs/libxfs/xfs_dir2.c
@@ -25,6 +25,12 @@ const struct xfs_name xfs_name_dotdot = {
.type = XFS_DIR3_FT_DIR,
};
+const struct xfs_name xfs_name_dot = {
+ .name = (const unsigned char *)".",
+ .len = 1,
+ .type = XFS_DIR3_FT_DIR,
+};
+
/*
* Convert inode mode to directory entry filetype
*/