btrfs: move checks for DUMMY_ROOT into a helper
Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
@@ -1130,11 +1130,9 @@ struct extent_buffer *btrfs_find_tree_block(struct btrfs_root *root,
|
||||
struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root,
|
||||
u64 bytenr, u32 blocksize)
|
||||
{
|
||||
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
|
||||
if (unlikely(test_bit(BTRFS_ROOT_DUMMY_ROOT, &root->state)))
|
||||
if (btrfs_test_is_dummy_root(root))
|
||||
return alloc_test_extent_buffer(root->fs_info, bytenr,
|
||||
blocksize);
|
||||
#endif
|
||||
return alloc_extent_buffer(root->fs_info, bytenr, blocksize);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user