diff options
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index def428a25b2a..7f92ab1daa87 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
@@ -2317,7 +2317,6 @@ void free_reloc_roots(struct list_head *list) | |||
2317 | static noinline_for_stack | 2317 | static noinline_for_stack |
2318 | int merge_reloc_roots(struct reloc_control *rc) | 2318 | int merge_reloc_roots(struct reloc_control *rc) |
2319 | { | 2319 | { |
2320 | struct btrfs_trans_handle *trans; | ||
2321 | struct btrfs_root *root; | 2320 | struct btrfs_root *root; |
2322 | struct btrfs_root *reloc_root; | 2321 | struct btrfs_root *reloc_root; |
2323 | u64 last_snap; | 2322 | u64 last_snap; |
@@ -2375,26 +2374,6 @@ again: | |||
2375 | list_add_tail(&reloc_root->root_list, | 2374 | list_add_tail(&reloc_root->root_list, |
2376 | &reloc_roots); | 2375 | &reloc_roots); |
2377 | goto out; | 2376 | goto out; |
2378 | } else if (!ret) { | ||
2379 | /* | ||
2380 | * recover the last snapshot tranid to avoid | ||
2381 | * the space balance break NOCOW. | ||
2382 | */ | ||
2383 | root = read_fs_root(rc->extent_root->fs_info, | ||
2384 | objectid); | ||
2385 | if (IS_ERR(root)) | ||
2386 | continue; | ||
2387 | |||
2388 | trans = btrfs_join_transaction(root); | ||
2389 | BUG_ON(IS_ERR(trans)); | ||
2390 | |||
2391 | /* Check if the fs/file tree was snapshoted or not. */ | ||
2392 | if (btrfs_root_last_snapshot(&root->root_item) == | ||
2393 | otransid - 1) | ||
2394 | btrfs_set_root_last_snapshot(&root->root_item, | ||
2395 | last_snap); | ||
2396 | |||
2397 | btrfs_end_transaction(trans, root); | ||
2398 | } | 2377 | } |
2399 | } | 2378 | } |
2400 | 2379 | ||