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 @@ -1917,12 +1917,10 @@ void merge_reloc_roots(struct reloc_control *rc)
1917
1917
reloc_root = list_entry (reloc_roots .next ,
1918
1918
struct btrfs_root , root_list );
1919
1919
1920
+ root = read_fs_root (fs_info , reloc_root -> root_key .offset );
1920
1921
if (btrfs_root_refs (& reloc_root -> root_item ) > 0 ) {
1921
- root = read_fs_root (fs_info ,
1922
- reloc_root -> root_key .offset );
1923
1922
BUG_ON (IS_ERR (root ));
1924
1923
BUG_ON (root -> reloc_root != reloc_root );
1925
-
1926
1924
ret = merge_reloc_root (rc , root );
1927
1925
btrfs_put_root (root );
1928
1926
if (ret ) {
@@ -1932,6 +1930,14 @@ void merge_reloc_roots(struct reloc_control *rc)
1932
1930
goto out ;
1933
1931
}
1934
1932
} else {
1933
+ if (!IS_ERR (root )) {
1934
+ if (root -> reloc_root == reloc_root ) {
1935
+ root -> reloc_root = NULL ;
1936
+ btrfs_put_root (reloc_root );
1937
+ }
1938
+ btrfs_put_root (root );
1939
+ }
1940
+
1935
1941
list_del_init (& reloc_root -> root_list );
1936
1942
/* Don't forget to queue this reloc root for cleanup */
1937
1943
list_add_tail (& reloc_root -> reloc_dirty_list ,
You can’t perform that action at this time.
0 commit comments