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 08:00:56 +0000 (09:00 +0100)
commita8dcf313882539edca8eb0f4043269de9c3722f0
treef4f28031c28309f89112ac09c9692155a5a9cdc2
parentd015901589a3b96d670ffe04abec2fa085dfee3c
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