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,