Btrfs: build up error handling for merge_reloc_roots
authorLiu Bo <bo.li.liu@oracle.com>
Mon, 4 Mar 2013 16:25:37 +0000 (16:25 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Mon, 4 Mar 2013 21:33:22 +0000 (16:33 -0500)
commitaca1bba6f9bc550a33312b28e98b3de5ddb3bb15
tree00d21d15fe4e57ee3e1618c898d0a78c7aab5068
parent8f71f3e0e4fb5a2445fb93d3057a33aefc4aa30d
Btrfs: build up error handling for merge_reloc_roots

We first use btrfs_std_error hook to replace with BUG_ON, and we
also need to cleanup what is left, including reloc roots rbtree
and reloc roots list.
Here we use a helper function to cleanup both rbtree and list, and
since this function can also be used in the balance recover path,
we also make the change as well to keep code simple.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/relocation.c