]> 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)
commitc7506606606510ae9d6036f1df7297ab362abf95
tree4137d0e5d3a72243303a3cee5107f3db57963b7f
parent2a81d87a1c2b4f8e13fb40c06f25980baabadfaf
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