dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Mark Fasheh 2011-09-08 17:40:01 -07:00 committed by David Sterba
parent 1dd4602fa7
commit 3acd395317
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}