summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-checker.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2024-04-18 00:47:13 +0200
committerDavid Sterba <dsterba@suse.com>2024-05-07 21:31:07 +0200
commitfef998d1a0b00ab35658484060354213a2c06c81 (patch)
tree7be7c24ac830e780fb63ec9b1de0c79865da11d9 /fs/btrfs/tree-checker.c
parentbtrfs: initialize delayed inodes xarray without GFP_ATOMIC (diff)
downloadlinux-fef998d1a0b00ab35658484060354213a2c06c81.tar.xz
linux-fef998d1a0b00ab35658484060354213a2c06c81.zip
btrfs: use btrfs_is_testing() everywhere
There are open coded tests of BTRFS_FS_STATE_DUMMY_FS_INFO and we have a wrapper for that that's a compile-time constant when self-tests are not built in. As this is only for development we can save some bytes and conditions on release configs by using the helper in the remaining cases. Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-checker.c')
-rw-r--r--fs/btrfs/tree-checker.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/tree-checker.c b/fs/btrfs/tree-checker.c
index 32604e9b31c3..a2c3651a3d8f 100644
--- a/fs/btrfs/tree-checker.c
+++ b/fs/btrfs/tree-checker.c
@@ -2021,7 +2021,7 @@ int btrfs_check_eb_owner(const struct extent_buffer *eb, u64 root_owner)
* Skip dummy fs, as selftests don't create unique ebs for each dummy
* root.
*/
- if (test_bit(BTRFS_FS_STATE_DUMMY_FS_INFO, &eb->fs_info->fs_state))
+ if (btrfs_is_testing(eb->fs_info))
return 0;
/*
* There are several call sites (backref walking, qgroup, and data