summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_dir2.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-03-10 13:14:37 -0800
committerDarrick J. Wong <djwong@kernel.org>2022-03-17 14:44:01 -0700
commitcf521c8fa3b520d238e1bf697e58803414d3dfcc (patch)
tree051546440d0ca5a3d6fe1a46269aabaf0c3e75da /fs/xfs/libxfs/xfs_dir2.h
parentb168fe30ec354ed8a5564523432af828021aaadc (diff)
xfs: constify the name argument to various directory functions
Various directory functions do not modify their @name parameter, so mark it const to make that clear. This will enable us to mark the global xfs_name_dotdot variable as const to prevent mischief. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_dir2.h')
-rw-r--r--fs/xfs/libxfs/xfs_dir2.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2.h b/fs/xfs/libxfs/xfs_dir2.h
index d03e6098ded9..55e0557000db 100644
--- a/fs/xfs/libxfs/xfs_dir2.h
+++ b/fs/xfs/libxfs/xfs_dir2.h
@@ -39,16 +39,16 @@ extern int xfs_dir_isempty(struct xfs_inode *dp);
extern int xfs_dir_init(struct xfs_trans *tp, struct xfs_inode *dp,
struct xfs_inode *pdp);
extern int xfs_dir_createname(struct xfs_trans *tp, struct xfs_inode *dp,
- struct xfs_name *name, xfs_ino_t inum,
+ const struct xfs_name *name, xfs_ino_t inum,
xfs_extlen_t tot);
extern int xfs_dir_lookup(struct xfs_trans *tp, struct xfs_inode *dp,
- struct xfs_name *name, xfs_ino_t *inum,
+ const struct xfs_name *name, xfs_ino_t *inum,
struct xfs_name *ci_name);
extern int xfs_dir_removename(struct xfs_trans *tp, struct xfs_inode *dp,
struct xfs_name *name, xfs_ino_t ino,
xfs_extlen_t tot);
extern int xfs_dir_replace(struct xfs_trans *tp, struct xfs_inode *dp,
- struct xfs_name *name, xfs_ino_t inum,
+ const struct xfs_name *name, xfs_ino_t inum,
xfs_extlen_t tot);
extern int xfs_dir_canenter(struct xfs_trans *tp, struct xfs_inode *dp,
struct xfs_name *name);