From afae10ddb68ebd25e6990b4261f7d438e102d2e7 Mon Sep 17 00:00:00 2001 From: Qu Wenruo Date: Wed, 31 Jul 2024 15:39:44 +0930 Subject: [PATCH] btrfs-progs: constify the name parameter of btrfs_add_link() The name is never touched, thus it should be const. Reviewed-by: Boris Burkov Signed-off-by: Qu Wenruo --- kernel-shared/ctree.h | 2 +- kernel-shared/inode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel-shared/ctree.h b/kernel-shared/ctree.h index 7761b3f6..b8f7a19b 100644 --- a/kernel-shared/ctree.h +++ b/kernel-shared/ctree.h @@ -1210,7 +1210,7 @@ int btrfs_new_inode(struct btrfs_trans_handle *trans, struct btrfs_root *root, int btrfs_change_inode_flags(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 ino, u64 flags); int btrfs_add_link(struct btrfs_trans_handle *trans, struct btrfs_root *root, - u64 ino, u64 parent_ino, char *name, int namelen, + u64 ino, u64 parent_ino, const char *name, int namelen, u8 type, u64 *index, int add_backref, int ignore_existed); int btrfs_unlink(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 ino, u64 parent_ino, u64 index, const char *name, diff --git a/kernel-shared/inode.c b/kernel-shared/inode.c index 5927af04..265d6298 100644 --- a/kernel-shared/inode.c +++ b/kernel-shared/inode.c @@ -167,7 +167,7 @@ out: * Currently only supports adding link from an inode to another inode. */ int btrfs_add_link(struct btrfs_trans_handle *trans, struct btrfs_root *root, - u64 ino, u64 parent_ino, char *name, int namelen, + u64 ino, u64 parent_ino, const char *name, int namelen, u8 type, u64 *index, int add_backref, int ignore_existed) { struct btrfs_path *path;