Skip to content

Commit

Permalink
btrfs: move ifdef around sanity checks out of init_btrfs_fs
Browse files Browse the repository at this point in the history
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
  • Loading branch information
David Sterba authored and Josef Bacik committed Jun 14, 2013
1 parent 905d0f5 commit e6d2960
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 3 additions & 1 deletion fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
@@ -3490,4 +3490,6 @@ void btrfs_test_free_space_cache(void)
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 */
2 changes: 0 additions & 2 deletions fs/btrfs/free-space-cache.h
Original file line number Diff line number Diff line change
@@ -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
2 changes: 0 additions & 2 deletions fs/btrfs/super.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit e6d2960

Please sign in to comment.