]> git.hungrycats.org Git - linux/commitdiff
Revert "btrfs: remove bogus BUG_ON in alloc_reserved_tree_block"
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sun, 5 Dec 2021 08:07:35 +0000 (03:07 -0500)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sun, 5 Dec 2021 08:07:35 +0000 (03:07 -0500)
This reverts commit 427df6a7c5ed589395424e5124550b9d3d77983e.

fs/btrfs/extent-tree.c

index 54b71bc55450b7c22ef0d7f2d6325b049d1c7b24..5f4d0416ce99c9a4faa0f369c75db7ca60682134 100644 (file)
@@ -4439,6 +4439,7 @@ static int alloc_reserved_tree_block(struct btrfs_trans_handle *trans,
        }
 
        if (node->type == BTRFS_SHARED_BLOCK_REF_KEY) {
+               BUG_ON(!(flags & BTRFS_BLOCK_FLAG_FULL_BACKREF));
                btrfs_set_extent_inline_ref_type(leaf, iref,
                                                 BTRFS_SHARED_BLOCK_REF_KEY);
                btrfs_set_extent_inline_ref_offset(leaf, iref, ref->parent);