From fbaff3b121e6f2607246143e7fab0a34ef415216 Mon Sep 17 00:00:00 2001 From: Josef Bacik Date: Wed, 23 Aug 2023 10:32:58 -0400 Subject: [PATCH] btrfs-progs: update btrfs_insert_item to match the kernel This has const struct btrfs_key instead of just struct btrfs_key, update this to make it more straightforward to sync ctree.c. Signed-off-by: Josef Bacik Signed-off-by: David Sterba --- kernel-shared/ctree.c | 6 +++--- kernel-shared/ctree.h | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/kernel-shared/ctree.c b/kernel-shared/ctree.c index 74a10d65..f3075ce4 100644 --- a/kernel-shared/ctree.c +++ b/kernel-shared/ctree.c @@ -2797,9 +2797,9 @@ out: * Given a key and some data, insert an item into the tree. * This does all the path init required, making room in the tree if needed. */ -int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root - *root, struct btrfs_key *cpu_key, void *data, u32 - data_size) +int btrfs_insert_item(struct btrfs_trans_handle *trans, + struct btrfs_root *root, const struct btrfs_key *cpu_key, + void *data, u32 data_size) { int ret = 0; struct btrfs_path *path; diff --git a/kernel-shared/ctree.h b/kernel-shared/ctree.h index e82344e8..d4577d74 100644 --- a/kernel-shared/ctree.h +++ b/kernel-shared/ctree.h @@ -1030,8 +1030,9 @@ struct btrfs_item_batch { int nr; }; -int btrfs_insert_item(struct btrfs_trans_handle *trans, struct btrfs_root - *root, struct btrfs_key *key, void *data, u32 data_size); +int btrfs_insert_item(struct btrfs_trans_handle *trans, + struct btrfs_root *root, const struct btrfs_key *key, + void *data, u32 data_size); int btrfs_insert_empty_items(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path,