btrfs: hide test-only member under ifdef

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2016-07-15 15:23:37 +02:00
parent aee133afcd
commit 05653ef386
2 changed files with 4 additions and 0 deletions

View File

@@ -8354,6 +8354,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans,
bool skinny_metadata = btrfs_fs_incompat(root->fs_info,
SKINNY_METADATA);
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
if (btrfs_test_is_dummy_root(root)) {
buf = btrfs_init_new_buffer(trans, root, root->alloc_bytenr,
level);
@@ -8361,6 +8362,7 @@ struct extent_buffer *btrfs_alloc_tree_block(struct btrfs_trans_handle *trans,
root->alloc_bytenr += blocksize;
return buf;
}
#endif
block_rsv = use_block_rsv(trans, root, blocksize);
if (IS_ERR(block_rsv))