]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
btrfs: make assert_rbio() to only check CONFIG_BTRFS_ASSERT
authorQu Wenruo <wqu@suse.com>
Mon, 16 Sep 2024 08:25:42 +0000 (17:55 +0930)
committerDavid Sterba <dsterba@suse.com>
Mon, 11 Nov 2024 13:34:12 +0000 (14:34 +0100)
According to the description, CONFIG_BTRFS_DEBUG is only for extra
debug info, meanwhile sanity checks should be managed by
CONFIG_BTRFS_ASSERT.

There is no need to check both to enable assert_rbio().

Just remove the check for CONFIG_BTRFS_DEBUG.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/raid56.c

index 39bec672df0cc0c151dca119011415c01643e0b7..cdd373c277848e418dead620f5be7515e354f521 100644 (file)
@@ -1272,8 +1272,7 @@ static inline void bio_list_put(struct bio_list *bio_list)
 
 static void assert_rbio(struct btrfs_raid_bio *rbio)
 {
-       if (!IS_ENABLED(CONFIG_BTRFS_DEBUG) ||
-           !IS_ENABLED(CONFIG_BTRFS_ASSERT))
+       if (!IS_ENABLED(CONFIG_BTRFS_ASSERT))
                return;
 
        /*