File tree 1 file changed +9
-3
lines changed 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -2624,12 +2624,10 @@ void merge_reloc_roots(struct reloc_control *rc)
2624
2624
reloc_root = list_entry (reloc_roots .next ,
2625
2625
struct btrfs_root , root_list );
2626
2626
2627
+ root = read_fs_root (fs_info , reloc_root -> root_key .offset );
2627
2628
if (btrfs_root_refs (& reloc_root -> root_item ) > 0 ) {
2628
- root = read_fs_root (fs_info ,
2629
- reloc_root -> root_key .offset );
2630
2629
BUG_ON (IS_ERR (root ));
2631
2630
BUG_ON (root -> reloc_root != reloc_root );
2632
-
2633
2631
ret = merge_reloc_root (rc , root );
2634
2632
btrfs_put_root (root );
2635
2633
if (ret ) {
@@ -2639,6 +2637,14 @@ void merge_reloc_roots(struct reloc_control *rc)
2639
2637
goto out ;
2640
2638
}
2641
2639
} else {
2640
+ if (!IS_ERR (root )) {
2641
+ if (root -> reloc_root == reloc_root ) {
2642
+ root -> reloc_root = NULL ;
2643
+ btrfs_put_root (reloc_root );
2644
+ }
2645
+ btrfs_put_root (root );
2646
+ }
2647
+
2642
2648
list_del_init (& reloc_root -> root_list );
2643
2649
/* Don't forget to queue this reloc root for cleanup */
2644
2650
list_add_tail (& reloc_root -> reloc_dirty_list ,
You can’t perform that action at this time.
0 commit comments