btrfs: remove BUG_ON() in find_parent_nodes()
authorJosef Bacik <josef@toxicpanda.com>
Fri, 5 Nov 2021 20:45:34 +0000 (16:45 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 09:54:19 +0000 (10:54 +0100)
commit623c65bc733683baf5dd7c66fa0593d59965e84f
tree37494a6f9415bdec7a363d468df0cc2f75b9e622
parent44cbd2a16a07cbc02a4921853d9f17f1ffaaa97a
btrfs: remove BUG_ON() in find_parent_nodes()

[ Upstream commit fcba0120edf88328524a4878d1d6f4ad39f2ec81 ]

We search for an extent entry with .offset = -1, which shouldn't be a
thing, but corruption happens.  Add an ASSERT() for the developers,
return -EUCLEAN for mortals.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/backref.c