Skip to content

Commit

Permalink
btrfs: make assert_rbio() to only check CONFIG_BTRFS_ASSERT
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Qu Wenruo authored and David Sterba committed Nov 11, 2024
1 parent 8cca35c commit c186345
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/btrfs/raid56.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit c186345

Please sign in to comment.