btrfs: don't BUG_ON() when 0 reference count at btrfs_lookup_extent_info()
authorFilipe Manana <fdmanana@suse.com>
Tue, 18 Jun 2024 11:15:01 +0000 (12:15 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 11 Jul 2024 13:33:26 +0000 (15:33 +0200)
commit28cb13f29faf6290597b24b728dc3100c019356f
treea49196523bbdbed163e95166f7827bbd73db3e46
parent5c83b3beaee06aa88d4015408ac2d8bb35380b06
btrfs: don't BUG_ON() when 0 reference count at btrfs_lookup_extent_info()

Instead of doing a BUG_ON() handle the error by returning -EUCLEAN,
aborting the transaction and logging an error message.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c