Signed-off-by: David Sterba <dsterba@xxxxxxx>
---
fs/btrfs/free-space-cache.c | 4 +++-
fs/btrfs/free-space-cache.h | 2 --
fs/btrfs/super.c | 2 --
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 3808303..d61eae9 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -3493,4 +3493,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 */
diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h
index 4dc17d8..37a3447 100644
--- a/fs/btrfs/free-space-cache.h
+++ b/fs/btrfs/free-space-cache.h
@@ -111,8 +111,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
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index a4807ce..0a51ed3 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -1732,9 +1732,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;
--
1.7.9
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html