/* Update the record referred to by cur to the value given. This either works (return 0) or gets an EFSCORRUPTED error.  */
STATIC int xfs_inobt_update(struct xfs_btree_cur *cur, xfs_inobt_rec_incore_t *irec)
/* Update the record referred to by cur to the value given. This either works (return 0) or gets an EFSCORRUPTED error.  */
STATIC int xfs_inobt_update(struct xfs_btree_cur *cur, xfs_inobt_rec_incore_t *irec)
{
	union xfs_btree_rec	rec;
	rec.inobt.ir_startino = cpu_to_be32(irec->ir_startino);
	rec.inobt.ir_freecount = cpu_to_be32(irec->ir_freecount);
	rec.inobt.ir_free = cpu_to_be64(irec->ir_free);
	return xfs_btree_update(cur, &rec);
}