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

Signed-off-by: Josef Bacik <>
[ switched to btrfs_err, errors go to common label ]
Reviewed-by: Liu Bo <>
Signed-off-by: David Sterba <>
Signed-off-by: Greg Kroah-Hartman <>

1 file changed