The internal free space tree management routines are always exposed for
testing purposes. Make them dependent on SANITY_TESTS being on so that
they are exposed only when they really have to.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
                                struct btrfs_fs_info *fs_info,
                                u64 start, u64 size);
 
-/* Exposed for testing. */
+#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
 struct btrfs_free_space_info *
 search_free_space_info(struct btrfs_trans_handle *trans,
                       struct btrfs_fs_info *fs_info,
                                  struct btrfs_path *path);
 int free_space_test_bit(struct btrfs_block_group_cache *block_group,
                        struct btrfs_path *path, u64 offset);
+#endif
 
 #endif