diff options
-rw-r--r-- | fs/btrfs/volumes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 281ff354f64f..f002973959d0 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -3327,8 +3327,9 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, | |||
3327 | write_lock(&em_tree->lock); | 3327 | write_lock(&em_tree->lock); |
3328 | ret = add_extent_mapping(em_tree, em); | 3328 | ret = add_extent_mapping(em_tree, em); |
3329 | write_unlock(&em_tree->lock); | 3329 | write_unlock(&em_tree->lock); |
3330 | BUG_ON(ret); | ||
3331 | free_extent_map(em); | 3330 | free_extent_map(em); |
3331 | if (ret) | ||
3332 | goto error; | ||
3332 | 3333 | ||
3333 | ret = btrfs_make_block_group(trans, extent_root, 0, type, | 3334 | ret = btrfs_make_block_group(trans, extent_root, 0, type, |
3334 | BTRFS_FIRST_CHUNK_TREE_OBJECTID, | 3335 | BTRFS_FIRST_CHUNK_TREE_OBJECTID, |