]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: abort transaction on unexpected eb generation at btrfs_copy_root()
authorFilipe Manana <fdmanana@suse.com>
Mon, 19 May 2025 10:07:29 +0000 (11:07 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:53:16 +0000 (23:53 +0200)
commit33e8f24b52d2796b8cfb28c19a1a7dd6476323a8
tree1becadf91aadd317515eb5984b2f8668b4934ece
parent273bbb5b487f0c562e1f7373601568933dc25fea
btrfs: abort transaction on unexpected eb generation at btrfs_copy_root()

If we find an unexpected generation for the extent buffer we are cloning
at btrfs_copy_root(), we just WARN_ON() and don't error out and abort the
transaction, meaning we allow to persist metadata with an unexpected
generation. Instead of warning only, abort the transaction and return
-EUCLEAN.

CC: stable@vger.kernel.org # 6.1+
Reviewed-by: Daniel Vacek <neelx@suse.com>
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>
fs/btrfs/ctree.c