Btrfs: kill some BUG_ONs() in the find_parent_nodes()
authorWang Shilong <[email protected]>
Fri, 29 Mar 2013 23:03:21 +0000 (23:03 +0000)
committerJosef Bacik <[email protected]>
Mon, 6 May 2013 19:54:30 +0000 (15:54 -0400)
commitf172393952a8771ca8970b8fcdd332a5a6ea0f56
treec7efbf55501297e39f967660657dd7f29f753eac
parent41b0fc42800569f63e029549b75c4c9cb63f2dfd
Btrfs: kill some BUG_ONs() in the find_parent_nodes()

The reason that BUG_ON() happens in these places is just
because of ENOMEM.

We try ro return ENOMEM rather than trigger BUG_ON(), the
caller will abort the transaction thus avoiding the kernel panic.

Signed-off-by: Wang Shilong <[email protected]>
Reviewed-by: Miao Xie <[email protected]>
Reviewed-by: Jan Schmidt <[email protected]>
Signed-off-by: Josef Bacik <[email protected]>
fs/btrfs/backref.c