btrfs: tests, use BTRFS_FS_STATE_DUMMY_FS_INFO instead of dummy root
[linux-2.6-block.git] / fs / btrfs / ctree.h
index 1cb84e01f2fdfabb3c7a6bfa0970f6113cfdaba7..41d5ca986c0c515812cffbcd4f732ca8144ef462 100644 (file)
@@ -1115,12 +1115,11 @@ struct btrfs_subvolume_writers {
 #define BTRFS_ROOT_REF_COWS            1
 #define BTRFS_ROOT_TRACK_DIRTY         2
 #define BTRFS_ROOT_IN_RADIX            3
-#define BTRFS_ROOT_DUMMY_ROOT          4
-#define BTRFS_ROOT_ORPHAN_ITEM_INSERTED        5
-#define BTRFS_ROOT_DEFRAG_RUNNING      6
-#define BTRFS_ROOT_FORCE_COW           7
-#define BTRFS_ROOT_MULTI_LOG_TASKS     8
-#define BTRFS_ROOT_DIRTY               9
+#define BTRFS_ROOT_ORPHAN_ITEM_INSERTED        4
+#define BTRFS_ROOT_DEFRAG_RUNNING      5
+#define BTRFS_ROOT_FORCE_COW           6
+#define BTRFS_ROOT_MULTI_LOG_TASKS     7
+#define BTRFS_ROOT_DIRTY               8
 
 /*
  * in ram representation of the tree.  extent_root is used for all allocations
@@ -3613,13 +3612,13 @@ static inline int btrfs_defrag_cancelled(struct btrfs_fs_info *fs_info)
 void btrfs_test_destroy_inode(struct inode *inode);
 #endif
 
-static inline int btrfs_test_is_dummy_root(struct btrfs_root *root)
+static inline int btrfs_is_testing(struct btrfs_fs_info *fs_info)
 {
 #ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
-       if (unlikely(test_bit(BTRFS_ROOT_DUMMY_ROOT, &root->state)))
+       if (unlikely(test_bit(BTRFS_FS_STATE_DUMMY_FS_INFO,
+                             &fs_info->fs_state)))
                return 1;
 #endif
        return 0;
 }
-
 #endif