]> git.hungrycats.org Git - linux/commit
btrfs: remove superfluous BUG_ON() in integrity checks
authorJohannes Thumshirn <jth@kernel.org>
Thu, 5 Dec 2019 13:19:58 +0000 (14:19 +0100)
committerDavid Sterba <dsterba@suse.com>
Fri, 6 Dec 2019 15:30:39 +0000 (16:30 +0100)
commit3cfff4cbcfa87050d0bb13c31e5c5fc0a85b549c
treec8ffce8f05635992bb1e1ea808ed768219c5e84d
parent962e1bf53337311f2548a4355f4b24de548d82cc
btrfs: remove superfluous BUG_ON() in integrity checks

btrfsic_process_superblock() BUG_ON()s if 'state' is NULL. But this can
never happen as the only caller from btrfsic_process_superblock() is
btrfsic_mount() which allocates 'state' some lines above calling
btrfsic_process_superblock() and checks for the allocation to succeed.

Let's just remove the impossible to hit BUG_ON().

Signed-off-by: Johannes Thumshirn <jth@kernel.org>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/check-integrity.c