summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.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/ctree.c
parent7ec20afbcb7b257aec82ea5d66e6b0b7499abaca (diff)
downloadlinux-fccb84c94a9755f48668e43d0a44d6ecc750900f.tar.gz
linux-fccb84c94a9755f48668e43d0a44d6ecc750900f.tar.bz2
linux-fccb84c94a9755f48668e43d0a44d6ecc750900f.zip
btrfs: move checks for DUMMY_ROOT into a helper
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r--fs/btrfs/ctree.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 533657c508e2..ce1d71d171bb 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -1506,10 +1506,9 @@ static inline int should_cow_block(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct extent_buffer *buf)
{
-#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 0;
-#endif
+
/* ensure we can see the force_cow */
smp_rmb();