Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

btrfs: Remove fs_info argument from add_to_free_space_tree

This function takes a transaction handle which already contains a
reference to the fs_info. So use it and remove the extra function
argument.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

Nikolay Borisov and committed by
David Sterba
e7355e50 25a356d3

+3 -5
+1 -1
fs/btrfs/extent-tree.c
··· 7127 7127 } 7128 7128 } 7129 7129 7130 - ret = add_to_free_space_tree(trans, info, bytenr, num_bytes); 7130 + ret = add_to_free_space_tree(trans, bytenr, num_bytes); 7131 7131 if (ret) { 7132 7132 btrfs_abort_transaction(trans, ret); 7133 7133 goto out;
+2 -3
fs/btrfs/free-space-tree.c
··· 999 999 } 1000 1000 1001 1001 int add_to_free_space_tree(struct btrfs_trans_handle *trans, 1002 - struct btrfs_fs_info *fs_info, 1003 1002 u64 start, u64 size) 1004 1003 { 1005 1004 struct btrfs_block_group_cache *block_group; 1006 1005 struct btrfs_path *path; 1007 1006 int ret; 1008 1007 1009 - if (!btrfs_fs_compat_ro(fs_info, FREE_SPACE_TREE)) 1008 + if (!btrfs_fs_compat_ro(trans->fs_info, FREE_SPACE_TREE)) 1010 1009 return 0; 1011 1010 1012 1011 path = btrfs_alloc_path(); ··· 1014 1015 goto out; 1015 1016 } 1016 1017 1017 - block_group = btrfs_lookup_block_group(fs_info, start); 1018 + block_group = btrfs_lookup_block_group(trans->fs_info, start); 1018 1019 if (!block_group) { 1019 1020 ASSERT(0); 1020 1021 ret = -ENOENT;
-1
fs/btrfs/free-space-tree.h
··· 23 23 int remove_block_group_free_space(struct btrfs_trans_handle *trans, 24 24 struct btrfs_block_group_cache *block_group); 25 25 int add_to_free_space_tree(struct btrfs_trans_handle *trans, 26 - struct btrfs_fs_info *fs_info, 27 26 u64 start, u64 size); 28 27 int remove_from_free_space_tree(struct btrfs_trans_handle *trans, 29 28 u64 start, u64 size);