]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
Btrfs: fix compiles when CONFIG_BTRFS_FS_RUN_SANITY_TESTS is off
authorChris Mason <clm@fb.com>
Tue, 7 Oct 2014 20:24:20 +0000 (13:24 -0700)
committerChris Mason <clm@fb.com>
Tue, 7 Oct 2014 20:24:20 +0000 (13:24 -0700)
Commit fccb84c94 moved added some helpers to cleanup our sanity tests,
but it looks like both Dave and I always compile with the tests enabled.

This fixes things to work when they are turned off too.

Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ctree.h
fs/btrfs/extent_io.h

index b94c1c76cd596a587b2b6d42dc1363d97f1c966b..d557264ee974deab61c33736d93af24ffb2a93d2 100644 (file)
@@ -1818,9 +1818,8 @@ struct btrfs_root {
 
        u64 highest_objectid;
 
-#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
+       /* only used with CONFIG_BTRFS_FS_RUN_SANITY_TESTS is enabled */
        u64 alloc_bytenr;
-#endif
 
        u64 defrag_trans_start;
        struct btrfs_key defrag_progress;
index f40d67f5866ba8525085689dc8d26932a15b0cca..6d4b938be98678660cc51fb55bd51a5688279ed8 100644 (file)
@@ -374,7 +374,7 @@ noinline u64 find_lock_delalloc_range(struct inode *inode,
                                      struct extent_io_tree *tree,
                                      struct page *locked_page, u64 *start,
                                      u64 *end, u64 max_bytes);
+#endif
 struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
                                               u64 start, unsigned long len);
 #endif
-#endif