aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-11-17 00:34:00 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-08 19:34:37 -0500
commit1233f546ec29ac32424327baf6ae5df81e3d9eae (patch)
tree43a9e1a6ea99627ee0d54641572a98ec165172de
parent2eb34cd368b3e5cef960ae9d9971a037cd6fa9d3 (diff)
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>
-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,
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)