aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 8e838b1cc806..ff2362dca91a 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1146,7 +1146,7 @@ struct extent_buffer *btrfs_find_tree_block(struct btrfs_fs_info *fs_info,
1146struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root, 1146struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root,
1147 u64 bytenr) 1147 u64 bytenr)
1148{ 1148{
1149 if (btrfs_test_is_dummy_root(root)) 1149 if (btrfs_is_testing(root->fs_info))
1150 return alloc_test_extent_buffer(root->fs_info, bytenr, 1150 return alloc_test_extent_buffer(root->fs_info, bytenr,
1151 root->nodesize); 1151 root->nodesize);
1152 return alloc_extent_buffer(root->fs_info, bytenr); 1152 return alloc_extent_buffer(root->fs_info, bytenr);
@@ -1330,7 +1330,6 @@ struct btrfs_root *btrfs_alloc_dummy_root(struct btrfs_fs_info *fs_info,
1330 /* We don't use the stripesize in selftest, set it as sectorsize */ 1330 /* We don't use the stripesize in selftest, set it as sectorsize */
1331 __setup_root(nodesize, sectorsize, sectorsize, root, fs_info, 1331 __setup_root(nodesize, sectorsize, sectorsize, root, fs_info,
1332 BTRFS_ROOT_TREE_OBJECTID); 1332 BTRFS_ROOT_TREE_OBJECTID);
1333 set_bit(BTRFS_ROOT_DUMMY_ROOT, &root->state);
1334 root->alloc_bytenr = 0; 1333 root->alloc_bytenr = 0;
1335 1334
1336 return root; 1335 return root;