summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/free-space-tree.h
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2017-08-16 18:15:23 +0300
committerDavid Sterba <dsterba@suse.com>2017-08-18 16:36:29 +0200
commit2d77ab3cfbf26ced6d445bfbffe8f7b9c72c4008 (patch)
treeca133a7d96b5e58ab2a9d47898c81100f36198bf /fs/btrfs/free-space-tree.h
parentdb7c942ce84cabbf740a1e5654d58b9201a4a5f0 (diff)
downloadlinux-stable-2d77ab3cfbf26ced6d445bfbffe8f7b9c72c4008.tar.gz
linux-stable-2d77ab3cfbf26ced6d445bfbffe8f7b9c72c4008.tar.bz2
linux-stable-2d77ab3cfbf26ced6d445bfbffe8f7b9c72c4008.zip
btrfs: expose internal free space tree routine only if sanity tests are enabled
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>
Diffstat (limited to 'fs/btrfs/free-space-tree.h')
-rw-r--r--fs/btrfs/free-space-tree.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/free-space-tree.h b/fs/btrfs/free-space-tree.h
index 54ffced3bce8..ba3787df43c3 100644
--- a/fs/btrfs/free-space-tree.h
+++ b/fs/btrfs/free-space-tree.h
@@ -44,7 +44,7 @@ int remove_from_free_space_tree(struct btrfs_trans_handle *trans,
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,
@@ -68,5 +68,6 @@ int convert_free_space_to_extents(struct btrfs_trans_handle *trans,
struct btrfs_path *path);
int free_space_test_bit(struct btrfs_block_group_cache *block_group,
struct btrfs_path *path, u64 offset);
+#endif
#endif