diff options
Diffstat (limited to 'volumes.c')
-rw-r--r-- | volumes.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -561,7 +561,8 @@ static int btrfs_alloc_dev_extent(struct btrfs_trans_handle *trans, key.type = BTRFS_DEV_EXTENT_KEY; ret = btrfs_insert_empty_item(trans, root, path, &key, sizeof(*extent)); - BUG_ON(ret); + if (ret < 0) + goto err; leaf = path->nodes[0]; extent = btrfs_item_ptr(leaf, path->slots[0], |