diff options
author | Mark Fasheh <mfasheh@suse.de> | 2011-09-08 20:40:01 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2012-03-21 20:45:39 -0400 |
commit | 3acd395317f22b4346a139571cd4723408c5d4af (patch) | |
tree | 2ccb38cbf20effabef8ff577be03f1414a912e32 /fs | |
parent | 1dd4602fa74273c28b3577a58aa389f330e9a0dc (diff) |
btrfs: Remove BUG_ON from __finish_chunk_alloc()
btrfs_alloc_chunk() unconditionally BUGs on any error returned from
__finish_chunk_alloc() so there's no need for two BUG_ON lines. Remove the
one from __finish_chunk_alloc().
Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/volumes.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index f002973959d0..394bf15ea18c 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -3383,7 +3383,8 @@ static int __finish_chunk_alloc(struct btrfs_trans_handle *trans, | |||
3383 | device = map->stripes[index].dev; | 3383 | device = map->stripes[index].dev; |
3384 | device->bytes_used += stripe_size; | 3384 | device->bytes_used += stripe_size; |
3385 | ret = btrfs_update_device(trans, device); | 3385 | ret = btrfs_update_device(trans, device); |
3386 | BUG_ON(ret); | 3386 | if (ret) |
3387 | goto out_free; | ||
3387 | index++; | 3388 | index++; |
3388 | } | 3389 | } |
3389 | 3390 | ||
@@ -3430,6 +3431,7 @@ static int __finish_chunk_alloc(struct btrfs_trans_handle *trans, | |||
3430 | item_size); | 3431 | item_size); |
3431 | } | 3432 | } |
3432 | 3433 | ||
3434 | out_free: | ||
3433 | kfree(chunk); | 3435 | kfree(chunk); |
3434 | return ret; | 3436 | return ret; |
3435 | } | 3437 | } |