summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-17 06:34:00 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-09 01:34:37 +0100
commit1233f546ec29ac32424327baf6ae5df81e3d9eae (patch)
tree43a9e1a6ea99627ee0d54641572a98ec165172de /fs
parentbtrfs: sanitizing ->fs_info, part 1 (diff)
downloadlinux-1233f546ec29ac32424327baf6ae5df81e3d9eae.tar.xz
linux-1233f546ec29ac32424327baf6ae5df81e3d9eae.zip
btrfs: sanitizing ->fs_info, part 2
lift assignment to callers of find_and_setup_root() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/disk-io.c5
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,
u32 blocksize;
u64 generation;
- root->fs_info = fs_info;
__setup_root(tree_root->nodesize, tree_root->leafsize,
tree_root->sectorsize, tree_root->stripesize,
root, fs_info, objectid);
@@ -1322,6 +1321,7 @@ struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_root *tree_root,
if (!root)
return ERR_PTR(-ENOMEM);
if (location->offset == (u64)-1) {
+ root->fs_info = fs_info;
ret = find_and_setup_root(tree_root, fs_info,
location->objectid, root);
if (ret) {
@@ -2300,18 +2300,21 @@ retry_root_backup:
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)