|
@@ -2317,7 +2317,6 @@ void free_reloc_roots(struct list_head *list)
|
|
|
static noinline_for_stack
|
|
|
int merge_reloc_roots(struct reloc_control *rc)
|
|
|
{
|
|
|
- struct btrfs_trans_handle *trans;
|
|
|
struct btrfs_root *root;
|
|
|
struct btrfs_root *reloc_root;
|
|
|
u64 last_snap;
|
|
@@ -2375,26 +2374,6 @@ again:
|
|
|
list_add_tail(&reloc_root->root_list,
|
|
|
&reloc_roots);
|
|
|
goto out;
|
|
|
- } else if (!ret) {
|
|
|
- /*
|
|
|
- * recover the last snapshot tranid to avoid
|
|
|
- * the space balance break NOCOW.
|
|
|
- */
|
|
|
- root = read_fs_root(rc->extent_root->fs_info,
|
|
|
- objectid);
|
|
|
- if (IS_ERR(root))
|
|
|
- continue;
|
|
|
-
|
|
|
- trans = btrfs_join_transaction(root);
|
|
|
- BUG_ON(IS_ERR(trans));
|
|
|
-
|
|
|
- /* Check if the fs/file tree was snapshoted or not. */
|
|
|
- if (btrfs_root_last_snapshot(&root->root_item) ==
|
|
|
- otransid - 1)
|
|
|
- btrfs_set_root_last_snapshot(&root->root_item,
|
|
|
- last_snap);
|
|
|
-
|
|
|
- btrfs_end_transaction(trans, root);
|
|
|
}
|
|
|
}
|
|
|
|