btrfs: move ifdef around sanity checks out of init_btrfs_fs
authorDavid Sterba <dsterba@suse.cz>
Tue, 30 Apr 2013 16:51:58 +0000 (16:51 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Fri, 14 Jun 2013 15:29:18 +0000 (11:29 -0400)
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/free-space-cache.c
fs/btrfs/free-space-cache.h
fs/btrfs/super.c

index 02c4d38f9e5024b6e0098510d0e71483c43267ad..ed26a5793cf77db17c2b35fc58ae80535767eb79 100644 (file)
@@ -3490,4 +3490,6 @@ out:
        test_msg("Free space cache tests finished\n");
 }
 #undef test_msg
-#endif /* CONFIG_BTRFS_FS_RUN_SANITY_TESTS */
+#else /* !CONFIG_BTRFS_FS_RUN_SANITY_TESTS */
+void btrfs_test_free_space_cache(void) {}
+#endif /* !CONFIG_BTRFS_FS_RUN_SANITY_TESTS */
index 8b7f19f4496153886975547923cdcdc815940e96..894116b71304c391aca53d31e4f063913952a6e6 100644 (file)
@@ -113,8 +113,6 @@ int btrfs_return_cluster_to_free_space(
 int btrfs_trim_block_group(struct btrfs_block_group_cache *block_group,
                           u64 *trimmed, u64 start, u64 end, u64 minlen);
 
-#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
 void btrfs_test_free_space_cache(void);
-#endif
 
 #endif
index f0857e092a3cb1af485604850052440579a1bbf1..107c6e23cbc07231315b9095cc2389e91971fda7 100644 (file)
@@ -1733,9 +1733,7 @@ static int __init init_btrfs_fs(void)
 
        btrfs_init_lockdep();
 
-#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
        btrfs_test_free_space_cache();
-#endif
 
        printk(KERN_INFO "%s loaded\n", BTRFS_BUILD_VERSION);
        return 0;