diff options
Diffstat (limited to 'fs/btrfs/root-tree.c')
-rw-r--r-- | fs/btrfs/root-tree.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index 0b1f4ef8db98..ec71ea44d2b4 100644 --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c | |||
@@ -299,11 +299,6 @@ int btrfs_find_orphan_roots(struct btrfs_root *tree_root) | |||
299 | continue; | 299 | continue; |
300 | } | 300 | } |
301 | 301 | ||
302 | if (btrfs_root_refs(&root->root_item) == 0) { | ||
303 | btrfs_add_dead_root(root); | ||
304 | continue; | ||
305 | } | ||
306 | |||
307 | err = btrfs_init_fs_root(root); | 302 | err = btrfs_init_fs_root(root); |
308 | if (err) { | 303 | if (err) { |
309 | btrfs_free_fs_root(root); | 304 | btrfs_free_fs_root(root); |
@@ -318,6 +313,9 @@ int btrfs_find_orphan_roots(struct btrfs_root *tree_root) | |||
318 | btrfs_free_fs_root(root); | 313 | btrfs_free_fs_root(root); |
319 | break; | 314 | break; |
320 | } | 315 | } |
316 | |||
317 | if (btrfs_root_refs(&root->root_item) == 0) | ||
318 | btrfs_add_dead_root(root); | ||
321 | } | 319 | } |
322 | 320 | ||
323 | btrfs_free_path(path); | 321 | btrfs_free_path(path); |