diff options
author | Omar Sandoval <osandov@fb.com> | 2017-01-18 10:24:37 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-14 17:50:58 +0300 |
commit | 310712b2f73ac1da4c3a99fd9886e8b652727508 (patch) | |
tree | 601e6457ce31dce18521cbfd51190501b0518c7d /fs/btrfs/extent-tree.c | |
parent | 4aaedfb0b68ca83471c5f10f1da7f0f4714080a1 (diff) | |
download | linux-310712b2f73ac1da4c3a99fd9886e8b652727508.tar.xz |
Btrfs: constify struct btrfs_{,disk_}key wherever possible
In a lot of places, it's unclear when it's safe to reuse a struct
btrfs_key after it has been passed to a helper function. Constify these
arguments wherever possible to make it obvious.
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 8234ef6f6078..9fde23475387 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -8346,10 +8346,11 @@ static void unuse_block_rsv(struct btrfs_fs_info *fs_info, * returns the tree buffer or an ERR_PTR on error. */ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans, - struct btrfs_root *root, - u64 parent, u64 root_objectid, - struct btrfs_disk_key *key, int level, - u64 hint, u64 empty_size) + struct btrfs_root *root, + u64 parent, u64 root_objectid, + const struct btrfs_disk_key *key, + int level, u64 hint, + u64 empty_size) { struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_key ins; |