summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2014-09-29 23:53:21 +0200
committerDavid Sterba <dsterba@suse.cz>2014-10-02 17:30:33 +0200
commitfccb84c94a9755f48668e43d0a44d6ecc750900f (patch)
tree7758746761316e21fca9c7c189f7082ff0866294 /fs/btrfs/disk-io.c
parent7ec20afbcb7b257aec82ea5d66e6b0b7499abaca (diff)
downloadlinux-stable-fccb84c94a9755f48668e43d0a44d6ecc750900f.tar.gz
linux-stable-fccb84c94a9755f48668e43d0a44d6ecc750900f.tar.bz2
linux-stable-fccb84c94a9755f48668e43d0a44d6ecc750900f.zip
btrfs: move checks for DUMMY_ROOT into a helper
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 0abf4b0a9010..14117f85b545 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -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);
}