]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: replace BUG_ON() with error handling at update_ref_for_cow()
authorFilipe Manana <fdmanana@suse.com>
Tue, 18 Jun 2024 14:55:16 +0000 (15:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Sep 2024 09:11:37 +0000 (11:11 +0200)
commit41a0f85e268d72fe04f731b8ceea4748c2d65491
tree2e3eb1cb9d611cc4b9abc3fd2c8662285f0890e8
parent7d1df13bf078ffebfedd361d714ff6cee1ff01b9
btrfs: replace BUG_ON() with error handling at update_ref_for_cow()

[ Upstream commit b56329a782314fde5b61058e2a25097af7ccb675 ]

Instead of a BUG_ON() just return an error, log an error message and
abort the transaction in case we find an extent buffer belonging to the
relocation tree that doesn't have the full backref flag set. This is
unexpected and should never happen (save for bugs or a potential bad
memory).

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.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/ctree.c