diff options
-rw-r--r-- | fs/btrfs/disk-io.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 04eba10af825..b8dae517f80c 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -1192,7 +1192,6 @@ static int find_and_setup_root(struct btrfs_root *tree_root, | |||
1192 | u32 blocksize; | 1192 | u32 blocksize; |
1193 | u64 generation; | 1193 | u64 generation; |
1194 | 1194 | ||
1195 | root->fs_info = fs_info; | ||
1196 | __setup_root(tree_root->nodesize, tree_root->leafsize, | 1195 | __setup_root(tree_root->nodesize, tree_root->leafsize, |
1197 | tree_root->sectorsize, tree_root->stripesize, | 1196 | tree_root->sectorsize, tree_root->stripesize, |
1198 | root, fs_info, objectid); | 1197 | root, fs_info, objectid); |
@@ -1322,6 +1321,7 @@ struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_root *tree_root, | |||
1322 | if (!root) | 1321 | if (!root) |
1323 | return ERR_PTR(-ENOMEM); | 1322 | return ERR_PTR(-ENOMEM); |
1324 | if (location->offset == (u64)-1) { | 1323 | if (location->offset == (u64)-1) { |
1324 | root->fs_info = fs_info; | ||
1325 | ret = find_and_setup_root(tree_root, fs_info, | 1325 | ret = find_and_setup_root(tree_root, fs_info, |
1326 | location->objectid, root); | 1326 | location->objectid, root); |
1327 | if (ret) { | 1327 | if (ret) { |
@@ -2300,18 +2300,21 @@ retry_root_backup: | |||
2300 | btrfs_set_root_node(&tree_root->root_item, tree_root->node); | 2300 | btrfs_set_root_node(&tree_root->root_item, tree_root->node); |
2301 | tree_root->commit_root = btrfs_root_node(tree_root); | 2301 | tree_root->commit_root = btrfs_root_node(tree_root); |
2302 | 2302 | ||
2303 | extent_root->fs_info = fs_info; | ||
2303 | ret = find_and_setup_root(tree_root, fs_info, | 2304 | ret = find_and_setup_root(tree_root, fs_info, |
2304 | BTRFS_EXTENT_TREE_OBJECTID, extent_root); | 2305 | BTRFS_EXTENT_TREE_OBJECTID, extent_root); |
2305 | if (ret) | 2306 | if (ret) |
2306 | goto recovery_tree_root; | 2307 | goto recovery_tree_root; |
2307 | extent_root->track_dirty = 1; | 2308 | extent_root->track_dirty = 1; |
2308 | 2309 | ||
2310 | dev_root->fs_info = fs_info; | ||
2309 | ret = find_and_setup_root(tree_root, fs_info, | 2311 | ret = find_and_setup_root(tree_root, fs_info, |
2310 | BTRFS_DEV_TREE_OBJECTID, dev_root); | 2312 | BTRFS_DEV_TREE_OBJECTID, dev_root); |
2311 | if (ret) | 2313 | if (ret) |
2312 | goto recovery_tree_root; | 2314 | goto recovery_tree_root; |
2313 | dev_root->track_dirty = 1; | 2315 | dev_root->track_dirty = 1; |
2314 | 2316 | ||
2317 | csum_root->fs_info = fs_info; | ||
2315 | ret = find_and_setup_root(tree_root, fs_info, | 2318 | ret = find_and_setup_root(tree_root, fs_info, |
2316 | BTRFS_CSUM_TREE_OBJECTID, csum_root); | 2319 | BTRFS_CSUM_TREE_OBJECTID, csum_root); |
2317 | if (ret) | 2320 | if (ret) |