summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorDavid Sterba2014-09-29 23:53:21 +0200
committerDavid Sterba2014-10-02 17:30:33 +0200
commitfccb84c94a9755f48668e43d0a44d6ecc750900f (patch)
tree7758746761316e21fca9c7c189f7082ff0866294 /fs/btrfs/ctree.h
parentbtrfs: new define for the inline extent data start (diff)
downloadkernel-qcow2-linux-fccb84c94a9755f48668e43d0a44d6ecc750900f.tar.gz
kernel-qcow2-linux-fccb84c94a9755f48668e43d0a44d6ecc750900f.tar.xz
kernel-qcow2-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.h')
-rw-r--r--fs/btrfs/ctree.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index bae025a20e63..557fd9520607 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -4131,4 +4131,13 @@ int btrfs_verify_qgroup_counts(struct btrfs_fs_info *fs_info, u64 qgroupid,
u64 rfer, u64 excl);
#endif
+static inline int btrfs_test_is_dummy_root(struct btrfs_root *root)
+{
+#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
+ if (unlikely(test_bit(BTRFS_ROOT_DUMMY_ROOT, &root->state)))
+ return 1;
+#endif
+ return 0;
+}
+
#endif