Skip to content

Commit

Permalink
Btrfs: Fix BUG_ON for fs converted from extN
Browse files Browse the repository at this point in the history
Tree blocks can live in data block groups in FS converted from extN.
So it's easy to trigger the BUG_ON.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Yan, Zheng authored and Chris Mason committed Jun 11, 2010
1 parent 046f264 commit 3bf84a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -4360,7 +4360,8 @@ void btrfs_free_tree_block(struct btrfs_trans_handle *trans,

block_rsv = get_block_rsv(trans, root);
cache = btrfs_lookup_block_group(root->fs_info, buf->start);
BUG_ON(block_rsv->space_info != cache->space_info);
if (block_rsv->space_info != cache->space_info)
goto out;

if (btrfs_header_generation(buf) == trans->transid) {
if (root->root_key.objectid != BTRFS_TREE_LOG_OBJECTID) {
Expand Down

0 comments on commit 3bf84a5

Please sign in to comment.