summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/fs.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2022-10-26 15:08:38 -0400
committerDavid Sterba <dsterba@suse.com>2022-12-05 18:00:47 +0100
commit6a6b4daf92fd8393eeac9631318d48d5b25ee4df (patch)
treec79fffe66ccc521f314e8e915abc9b0d800c3643 /fs/btrfs/fs.h
parent5c11adcc383a94cacd652461c9435bf7a5c53c9c (diff)
downloadlinux-stable-6a6b4daf92fd8393eeac9631318d48d5b25ee4df.tar.gz
linux-stable-6a6b4daf92fd8393eeac9631318d48d5b25ee4df.tar.bz2
linux-stable-6a6b4daf92fd8393eeac9631318d48d5b25ee4df.zip
btrfs: move CONFIG_BTRFS_FS_RUN_SANITY_TESTS checks to fs.h
We already have a few of these in fs.h, move the remaining checks out of ctree.h into fs.h. Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/fs.h')
-rw-r--r--fs/btrfs/fs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/fs.h b/fs/btrfs/fs.h
index a49d11127bf7..7d0da8509567 100644
--- a/fs/btrfs/fs.h
+++ b/fs/btrfs/fs.h
@@ -971,11 +971,20 @@ static inline void btrfs_wake_unfinished_drop(struct btrfs_fs_info *fs_info)
&(fs_info)->fs_state)))
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
+
+#define EXPORT_FOR_TESTS
+
static inline int btrfs_is_testing(struct btrfs_fs_info *fs_info)
{
return test_bit(BTRFS_FS_STATE_DUMMY_FS_INFO, &fs_info->fs_state);
}
+
+void btrfs_test_destroy_inode(struct inode *inode);
+
#else
+
+#define EXPORT_FOR_TESTS static
+
static inline int btrfs_is_testing(struct btrfs_fs_info *fs_info)
{
return 0;