diff options
Diffstat (limited to 'fs/btrfs/ioctl.c')
-rw-r--r-- | fs/btrfs/ioctl.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 4a20f3e68cb4..67c37fdd00dc 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -596,14 +596,13 @@ static noinline int create_subvol(struct inode *dir, ret = btrfs_update_inode(trans, root, dir); BUG_ON(ret); - ret = btrfs_add_root_ref(trans, root->fs_info->tree_root, + ret = btrfs_add_root_ref(trans, root->fs_info, objectid, root->root_key.objectid, btrfs_ino(dir), index, name, namelen); BUG_ON(ret); - ret = btrfs_uuid_tree_add(trans, root->fs_info->uuid_root, - root_item->uuid, BTRFS_UUID_KEY_SUBVOL, - objectid); + ret = btrfs_uuid_tree_add(trans, root->fs_info, root_item->uuid, + BTRFS_UUID_KEY_SUBVOL, objectid); if (ret) btrfs_abort_transaction(trans, ret); @@ -2520,8 +2519,8 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, } } - ret = btrfs_uuid_tree_rem(trans, root->fs_info->uuid_root, - dest->root_item.uuid, BTRFS_UUID_KEY_SUBVOL, + ret = btrfs_uuid_tree_rem(trans, root->fs_info, dest->root_item.uuid, + BTRFS_UUID_KEY_SUBVOL, dest->root_key.objectid); if (ret && ret != -ENOENT) { btrfs_abort_transaction(trans, ret); @@ -2529,7 +2528,7 @@ static noinline int btrfs_ioctl_snap_destroy(struct file *file, goto out_end_trans; } if (!btrfs_is_empty_uuid(dest->root_item.received_uuid)) { - ret = btrfs_uuid_tree_rem(trans, root->fs_info->uuid_root, + ret = btrfs_uuid_tree_rem(trans, root->fs_info, dest->root_item.received_uuid, BTRFS_UUID_KEY_RECEIVED_SUBVOL, dest->root_key.objectid); @@ -5148,7 +5147,7 @@ static long _btrfs_ioctl_set_received_subvol(struct file *file, BTRFS_UUID_SIZE); if (received_uuid_changed && !btrfs_is_empty_uuid(root_item->received_uuid)) - btrfs_uuid_tree_rem(trans, root->fs_info->uuid_root, + btrfs_uuid_tree_rem(trans, root->fs_info, root_item->received_uuid, BTRFS_UUID_KEY_RECEIVED_SUBVOL, root->root_key.objectid); @@ -5167,8 +5166,7 @@ static long _btrfs_ioctl_set_received_subvol(struct file *file, goto out; } if (received_uuid_changed && !btrfs_is_empty_uuid(sa->uuid)) { - ret = btrfs_uuid_tree_add(trans, root->fs_info->uuid_root, - sa->uuid, + ret = btrfs_uuid_tree_add(trans, root->fs_info, sa->uuid, BTRFS_UUID_KEY_RECEIVED_SUBVOL, root->root_key.objectid); if (ret < 0 && ret != -EEXIST) { |