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 btrfs_uuid_tree_rem

This function always takes a transaction handle which contains a
reference to the fs_info. Use that and remove the extra argument.

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
[ rename the function ]
Signed-off-by: David Sterba <dsterba@suse.com>

authored by

Lu Fengqi and committed by
David Sterba
d1957791 cdb345a8

+7 -9
+1 -2
fs/btrfs/ctree.h
··· 3042 3042 /* uuid-tree.c */ 3043 3043 int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type, 3044 3044 u64 subid); 3045 - int btrfs_uuid_tree_rem(struct btrfs_trans_handle *trans, 3046 - struct btrfs_fs_info *fs_info, u8 *uuid, u8 type, 3045 + int btrfs_uuid_tree_remove(struct btrfs_trans_handle *trans, u8 *uuid, u8 type, 3047 3046 u64 subid); 3048 3047 int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info, 3049 3048 int (*check_func)(struct btrfs_fs_info *, u8 *, u8,
+2 -2
fs/btrfs/inode.c
··· 4361 4361 } 4362 4362 } 4363 4363 4364 - ret = btrfs_uuid_tree_rem(trans, fs_info, dest->root_item.uuid, 4364 + ret = btrfs_uuid_tree_remove(trans, dest->root_item.uuid, 4365 4365 BTRFS_UUID_KEY_SUBVOL, 4366 4366 dest->root_key.objectid); 4367 4367 if (ret && ret != -ENOENT) { ··· 4370 4370 goto out_end_trans; 4371 4371 } 4372 4372 if (!btrfs_is_empty_uuid(dest->root_item.received_uuid)) { 4373 - ret = btrfs_uuid_tree_rem(trans, fs_info, 4373 + ret = btrfs_uuid_tree_remove(trans, 4374 4374 dest->root_item.received_uuid, 4375 4375 BTRFS_UUID_KEY_RECEIVED_SUBVOL, 4376 4376 dest->root_key.objectid);
+1 -2
fs/btrfs/ioctl.c
··· 5018 5018 BTRFS_UUID_SIZE); 5019 5019 if (received_uuid_changed && 5020 5020 !btrfs_is_empty_uuid(root_item->received_uuid)) { 5021 - ret = btrfs_uuid_tree_rem(trans, fs_info, 5022 - root_item->received_uuid, 5021 + ret = btrfs_uuid_tree_remove(trans, root_item->received_uuid, 5023 5022 BTRFS_UUID_KEY_RECEIVED_SUBVOL, 5024 5023 root->root_key.objectid); 5025 5024 if (ret && ret != -ENOENT) {
+3 -3
fs/btrfs/uuid-tree.c
··· 144 144 return ret; 145 145 } 146 146 147 - int btrfs_uuid_tree_rem(struct btrfs_trans_handle *trans, 148 - struct btrfs_fs_info *fs_info, u8 *uuid, u8 type, 147 + int btrfs_uuid_tree_remove(struct btrfs_trans_handle *trans, u8 *uuid, u8 type, 149 148 u64 subid) 150 149 { 150 + struct btrfs_fs_info *fs_info = trans->fs_info; 151 151 struct btrfs_root *uuid_root = fs_info->uuid_root; 152 152 int ret; 153 153 struct btrfs_path *path = NULL; ··· 239 239 goto out; 240 240 } 241 241 242 - ret = btrfs_uuid_tree_rem(trans, uuid_root->fs_info, uuid, type, subid); 242 + ret = btrfs_uuid_tree_remove(trans, uuid, type, subid); 243 243 btrfs_end_transaction(trans); 244 244 245 245 out: