From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Boris Burkov <boris@bur.io>
Subject: [PATCH v2 1/5] btrfs-progs: constify the name parameter of btrfs_add_link()
Date: Thu, 1 Aug 2024 15:42:36 +0930 [thread overview]
Message-ID: <fe9b4e30843d521343a8913ddd360f2d681cb213.1722492491.git.wqu@suse.com> (raw)
In-Reply-To: <cover.1722492491.git.wqu@suse.com>
The name is never touched, thus it should be const.
Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Qu Wenruo <wqu@suse.com>
---
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 7761b3f6fb1b..b8f7a19b64b4 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 5927af041dbf..265d62988fd0 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;
--
2.45.2
next prev parent reply other threads:[~2024-08-01 6:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-01 6:12 [PATCH v2 0/5] btrfs-progs: rework how we traverse rootdir Qu Wenruo
2024-08-01 6:12 ` Qu Wenruo [this message]
2024-08-01 6:12 ` [PATCH v2 2/5] btrfs-progs: mkfs: " Qu Wenruo
2024-08-01 6:12 ` [PATCH v2 3/5] btrfs-progs: rootdir: warn about hard links Qu Wenruo
2024-08-01 6:12 ` [PATCH v2 4/5] btrfs-progs: mkfs-tests: a new test case to verify handling of " Qu Wenruo
2024-08-01 6:12 ` [PATCH v2 5/5] btrfs-progs: mkfs-tests: verify cross mount point behavior for rootdir Qu Wenruo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fe9b4e30843d521343a8913ddd360f2d681cb213.1722492491.git.wqu@suse.com \
--to=wqu@suse.com \
--cc=boris@bur.io \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox