Skip to content

Commit 0d4cf4e

Browse files
committed
Btrfs: fix compiles when CONFIG_BTRFS_FS_RUN_SANITY_TESTS is off
Commit fccb84c 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 <[email protected]>
1 parent f667aef commit 0d4cf4e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

fs/btrfs/ctree.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1818,9 +1818,8 @@ struct btrfs_root {
18181818

18191819
u64 highest_objectid;
18201820

1821-
#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
1821+
/* only used with CONFIG_BTRFS_FS_RUN_SANITY_TESTS is enabled */
18221822
u64 alloc_bytenr;
1823-
#endif
18241823

18251824
u64 defrag_trans_start;
18261825
struct btrfs_key defrag_progress;

fs/btrfs/extent_io.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ noinline u64 find_lock_delalloc_range(struct inode *inode,
374374
struct extent_io_tree *tree,
375375
struct page *locked_page, u64 *start,
376376
u64 *end, u64 max_bytes);
377+
#endif
377378
struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
378379
u64 start, unsigned long len);
379380
#endif
380-
#endif

0 commit comments

Comments
 (0)