diff --git a/[refs] b/[refs] index 4bd5a6d26d89..6f50b36f4a63 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1dd4602fa74273c28b3577a58aa389f330e9a0dc +refs/heads/master: 3acd395317f22b4346a139571cd4723408c5d4af diff --git a/trunk/fs/btrfs/volumes.c b/trunk/fs/btrfs/volumes.c index f002973959d0..394bf15ea18c 100644 --- a/trunk/fs/btrfs/volumes.c +++ b/trunk/fs/btrfs/volumes.c @@ -3383,7 +3383,8 @@ static int __finish_chunk_alloc(struct btrfs_trans_handle *trans, device = map->stripes[index].dev; device->bytes_used += stripe_size; ret = btrfs_update_device(trans, device); - BUG_ON(ret); + if (ret) + goto out_free; index++; } @@ -3430,6 +3431,7 @@ static int __finish_chunk_alloc(struct btrfs_trans_handle *trans, item_size); } +out_free: kfree(chunk); return ret; }