Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286022
b: refs/heads/master
c: 38a77db
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Jan 9, 2012
1 parent 7b4eabd commit 8bfca39
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1233f546ec29ac32424327baf6ae5df81e3d9eae
refs/heads/master: 38a77db49ad8f78369dcdfb693b8e5a818a60104
12 changes: 5 additions & 7 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -1320,8 +1320,8 @@ struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_root *tree_root,
root = kzalloc(sizeof(*root), GFP_NOFS);
if (!root)
return ERR_PTR(-ENOMEM);
root->fs_info = fs_info;
if (location->offset == (u64)-1) {
root->fs_info = fs_info;
ret = find_and_setup_root(tree_root, fs_info,
location->objectid, root);
if (ret) {
Expand All @@ -1331,7 +1331,6 @@ struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_root *tree_root,
goto out;
}

root->fs_info = fs_info;
__setup_root(tree_root->nodesize, tree_root->leafsize,
tree_root->sectorsize, tree_root->stripesize,
root, fs_info, location->objectid);
Expand Down Expand Up @@ -1914,6 +1913,10 @@ struct btrfs_root *open_ctree(struct super_block *sb,
err = -ENOMEM;
goto fail;
}
chunk_root->fs_info = fs_info;
extent_root->fs_info = fs_info;
dev_root->fs_info = fs_info;
csum_root->fs_info = fs_info;

ret = init_srcu_struct(&fs_info->subvol_srcu);
if (ret) {
Expand Down Expand Up @@ -2057,7 +2060,6 @@ struct btrfs_root *open_ctree(struct super_block *sb,
init_waitqueue_head(&fs_info->transaction_blocked_wait);
init_waitqueue_head(&fs_info->async_submit_wait);

tree_root->fs_info = fs_info;
__setup_root(4096, 4096, 4096, 4096, tree_root,
fs_info, BTRFS_ROOT_TREE_OBJECTID);

Expand Down Expand Up @@ -2250,7 +2252,6 @@ struct btrfs_root *open_ctree(struct super_block *sb,
btrfs_super_chunk_root_level(disk_super));
generation = btrfs_super_chunk_root_generation(disk_super);

chunk_root->fs_info = fs_info;
__setup_root(nodesize, leafsize, sectorsize, stripesize,
chunk_root, fs_info, BTRFS_CHUNK_TREE_OBJECTID);

Expand Down Expand Up @@ -2300,21 +2301,18 @@ struct btrfs_root *open_ctree(struct super_block *sb,
btrfs_set_root_node(&tree_root->root_item, tree_root->node);
tree_root->commit_root = btrfs_root_node(tree_root);

extent_root->fs_info = fs_info;
ret = find_and_setup_root(tree_root, fs_info,
BTRFS_EXTENT_TREE_OBJECTID, extent_root);
if (ret)
goto recovery_tree_root;
extent_root->track_dirty = 1;

dev_root->fs_info = fs_info;
ret = find_and_setup_root(tree_root, fs_info,
BTRFS_DEV_TREE_OBJECTID, dev_root);
if (ret)
goto recovery_tree_root;
dev_root->track_dirty = 1;

csum_root->fs_info = fs_info;
ret = find_and_setup_root(tree_root, fs_info,
BTRFS_CSUM_TREE_OBJECTID, csum_root);
if (ret)
Expand Down

0 comments on commit 8bfca39

Please sign in to comment.