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>
This commit is contained in:
parent
cdb345a877
commit
d19577912d
4 changed files with 7 additions and 9 deletions
fs/btrfs
|
@ -3042,8 +3042,7 @@ void btrfs_update_root_times(struct btrfs_trans_handle *trans,
|
||||||
/* uuid-tree.c */
|
/* uuid-tree.c */
|
||||||
int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
|
int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
|
||||||
u64 subid);
|
u64 subid);
|
||||||
int btrfs_uuid_tree_rem(struct btrfs_trans_handle *trans,
|
int btrfs_uuid_tree_remove(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
|
||||||
struct btrfs_fs_info *fs_info, u8 *uuid, u8 type,
|
|
||||||
u64 subid);
|
u64 subid);
|
||||||
int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info,
|
int btrfs_uuid_tree_iterate(struct btrfs_fs_info *fs_info,
|
||||||
int (*check_func)(struct btrfs_fs_info *, u8 *, u8,
|
int (*check_func)(struct btrfs_fs_info *, u8 *, u8,
|
||||||
|
|
|
@ -4361,7 +4361,7 @@ int btrfs_delete_subvolume(struct inode *dir, struct dentry *dentry)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = btrfs_uuid_tree_rem(trans, fs_info, dest->root_item.uuid,
|
ret = btrfs_uuid_tree_remove(trans, dest->root_item.uuid,
|
||||||
BTRFS_UUID_KEY_SUBVOL,
|
BTRFS_UUID_KEY_SUBVOL,
|
||||||
dest->root_key.objectid);
|
dest->root_key.objectid);
|
||||||
if (ret && ret != -ENOENT) {
|
if (ret && ret != -ENOENT) {
|
||||||
|
@ -4370,7 +4370,7 @@ int btrfs_delete_subvolume(struct inode *dir, struct dentry *dentry)
|
||||||
goto out_end_trans;
|
goto out_end_trans;
|
||||||
}
|
}
|
||||||
if (!btrfs_is_empty_uuid(dest->root_item.received_uuid)) {
|
if (!btrfs_is_empty_uuid(dest->root_item.received_uuid)) {
|
||||||
ret = btrfs_uuid_tree_rem(trans, fs_info,
|
ret = btrfs_uuid_tree_remove(trans,
|
||||||
dest->root_item.received_uuid,
|
dest->root_item.received_uuid,
|
||||||
BTRFS_UUID_KEY_RECEIVED_SUBVOL,
|
BTRFS_UUID_KEY_RECEIVED_SUBVOL,
|
||||||
dest->root_key.objectid);
|
dest->root_key.objectid);
|
||||||
|
|
|
@ -5018,8 +5018,7 @@ static long _btrfs_ioctl_set_received_subvol(struct file *file,
|
||||||
BTRFS_UUID_SIZE);
|
BTRFS_UUID_SIZE);
|
||||||
if (received_uuid_changed &&
|
if (received_uuid_changed &&
|
||||||
!btrfs_is_empty_uuid(root_item->received_uuid)) {
|
!btrfs_is_empty_uuid(root_item->received_uuid)) {
|
||||||
ret = btrfs_uuid_tree_rem(trans, fs_info,
|
ret = btrfs_uuid_tree_remove(trans, root_item->received_uuid,
|
||||||
root_item->received_uuid,
|
|
||||||
BTRFS_UUID_KEY_RECEIVED_SUBVOL,
|
BTRFS_UUID_KEY_RECEIVED_SUBVOL,
|
||||||
root->root_key.objectid);
|
root->root_key.objectid);
|
||||||
if (ret && ret != -ENOENT) {
|
if (ret && ret != -ENOENT) {
|
||||||
|
|
|
@ -144,10 +144,10 @@ int btrfs_uuid_tree_add(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int btrfs_uuid_tree_rem(struct btrfs_trans_handle *trans,
|
int btrfs_uuid_tree_remove(struct btrfs_trans_handle *trans, u8 *uuid, u8 type,
|
||||||
struct btrfs_fs_info *fs_info, u8 *uuid, u8 type,
|
|
||||||
u64 subid)
|
u64 subid)
|
||||||
{
|
{
|
||||||
|
struct btrfs_fs_info *fs_info = trans->fs_info;
|
||||||
struct btrfs_root *uuid_root = fs_info->uuid_root;
|
struct btrfs_root *uuid_root = fs_info->uuid_root;
|
||||||
int ret;
|
int ret;
|
||||||
struct btrfs_path *path = NULL;
|
struct btrfs_path *path = NULL;
|
||||||
|
@ -239,7 +239,7 @@ static int btrfs_uuid_iter_rem(struct btrfs_root *uuid_root, u8 *uuid, u8 type,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = btrfs_uuid_tree_rem(trans, uuid_root->fs_info, uuid, type, subid);
|
ret = btrfs_uuid_tree_remove(trans, uuid, type, subid);
|
||||||
btrfs_end_transaction(trans);
|
btrfs_end_transaction(trans);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
|
Loading…
Add table
Reference in a new issue