]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fixup error handling in btrfs_reloc_cow
authorJosef Bacik <jbacik@fusionio.com>
Fri, 30 Aug 2013 19:09:51 +0000 (15:09 -0400)
committerChris Mason <chris.mason@fusionio.com>
Sat, 21 Sep 2013 14:58:54 +0000 (10:58 -0400)
commit7c9343f55d262c47aa48880f530d33e7ee8ad07e
tree4137d0e5d3a72243303a3cee5107f3db57963b7f
parentb97c8c942f6498d03f6f1d163004855ae418101f
Btrfs: fixup error handling in btrfs_reloc_cow

If we failed to actually allocate the correct size of the extent to relocate we
will end up in an infinite loop because we won't return an error, we'll just
move on to the next extent.  So fix this up by returning an error, and then fix
all the callers to return an error up the stack rather than BUG_ON()'ing.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/relocation.c