diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2016-10-25 10:11:04 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-10-25 14:28:25 +0200 |
commit | 4d958295d2c7608c8c695d8fc3e9e9e94bae089b (patch) | |
tree | 4a8cd347b599c36b198e669423b1621aa740b0d7 /utils.c | |
parent | fd48a96b9abab6845c0b148e91f520e74d385d85 (diff) |
btrfs-progs: volumes: Remove BUG_ON in raid56 write routine
Remove various BUG_ON in raid56 write routine, including:
1) Memory allocation error
Old codes allocates memory when code needs new memory in a loop, and
catch the error using BUG_ON().
New codes allocates memory in a allocation loop first, if any failure
is caught, freeing already allocated memories then throw -ENOMEM.
2) Write error
Change BUG_ON() to correct return value.
3) Validation check
Same as write error.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'utils.c')
0 files changed, 0 insertions, 0 deletions