Btrfs: don't BUG() during drop snapshot
authorJosef Bacik <jbacik@fb.com>
Fri, 23 Sep 2016 11:23:28 +0000 (13:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jan 2017 10:16:20 +0000 (11:16 +0100)
commit02fffa116bda3353e41954e48ca5253f970b6c4d
tree270145356f8295fcadc55af839b456c3a369c8d2
parent0f2e022db23739f537ca2abc66aae1e5ba9205e8
Btrfs: don't BUG() during drop snapshot

commit 4867268c57ff709a7b6b86ae6f6537d846d1443a upstream.

Really there's lots of things that can go wrong here, kill all the
BUG_ON()'s and replace the logic ones with ASSERT()'s and return EIO
instead.

Signed-off-by: Josef Bacik <jbacik@fb.com>
[ switched to btrfs_err, errors go to common label ]
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/extent-tree.c