summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_dir2.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-03-09 10:16:12 -0800
committerDarrick J. Wong <djwong@kernel.org>2022-03-14 10:23:17 -0700
commit744e6c8ada5d612353a42ce8cd8323dd2364a70d (patch)
treec51b8089574958c088cac1b18626474d093cf9e3 /fs/xfs/libxfs/xfs_dir2.h
parent996b2329b20a89963fa577d495cf057dd7bf129c (diff)
xfs: constify xfs_name_dotdot
The symbol xfs_name_dotdot is a global variable that the xfs codebase uses here and there to look up directory dotdot entries. Currently it's a non-const variable, which means that it's a mutable global variable. So far nobody's abused this to cause problems, but let's use the compiler to enforce that. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2.h')
-rw-r--r--fs/xfs/libxfs/xfs_dir2.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2.h b/fs/xfs/libxfs/xfs_dir2.h
index 55e0557000db..b6df3c34b26a 100644
--- a/fs/xfs/libxfs/xfs_dir2.h
+++ b/fs/xfs/libxfs/xfs_dir2.h
@@ -21,7 +21,7 @@ struct xfs_dir2_data_unused;
struct xfs_dir3_icfree_hdr;
struct xfs_dir3_icleaf_hdr;
-extern struct xfs_name xfs_name_dotdot;
+extern const struct xfs_name xfs_name_dotdot;
/*
* Convert inode mode to directory entry filetype