/* Wrapper around bwrite() so that we can trap write errors, and act accordingly.  */
int xfs_bwrite(struct xfs_mount *mp, struct xfs_buf *bp)
/* Wrapper around bwrite() so that we can trap write errors, and act accordingly.  */
int xfs_bwrite(struct xfs_mount *mp, struct xfs_buf *bp)
{
	int	error;
	XFS_BUF_SET_BDSTRAT_FUNC(bp, xfs_bdstrat_cb);
	bp->b_mount = mp;
	XFS_BUF_WRITE(bp);
	if ((error = XFS_bwrite(bp))) {
		ASSERT(mp);
		xfs_force_shutdown(mp, SHUTDOWN_META_IO_ERROR);
	}
	return (error);
}