[PATCH 6.10 244/375] btrfs: replace BUG_ON() with error handling at update_ref_for_cow()