diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/relocation.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 277b8e371fa5..9189f9e3c359 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c | |||
@@ -2311,9 +2311,6 @@ void free_reloc_roots(struct list_head *list) | |||
2311 | reloc_root = list_entry(list->next, struct btrfs_root, | 2311 | reloc_root = list_entry(list->next, struct btrfs_root, |
2312 | root_list); | 2312 | root_list); |
2313 | __del_reloc_root(reloc_root); | 2313 | __del_reloc_root(reloc_root); |
2314 | free_extent_buffer(reloc_root->node); | ||
2315 | free_extent_buffer(reloc_root->commit_root); | ||
2316 | kfree(reloc_root); | ||
2317 | } | 2314 | } |
2318 | } | 2315 | } |
2319 | 2316 | ||
@@ -2355,10 +2352,9 @@ again: | |||
2355 | 2352 | ||
2356 | ret = merge_reloc_root(rc, root); | 2353 | ret = merge_reloc_root(rc, root); |
2357 | if (ret) { | 2354 | if (ret) { |
2358 | __del_reloc_root(reloc_root); | 2355 | if (list_empty(&reloc_root->root_list)) |
2359 | free_extent_buffer(reloc_root->node); | 2356 | list_add_tail(&reloc_root->root_list, |
2360 | free_extent_buffer(reloc_root->commit_root); | 2357 | &reloc_roots); |
2361 | kfree(reloc_root); | ||
2362 | goto out; | 2358 | goto out; |
2363 | } | 2359 | } |
2364 | } else { | 2360 | } else { |