/* If the end of the current ioend is beyond the current EOF, return the new EOF value, otherwise zero.  */
STATIC xfs_fsize_t xfs_ioend_new_eof(xfs_ioend_t *ioend)
/* If the end of the current ioend is beyond the current EOF, return the new EOF value, otherwise zero.  */
STATIC xfs_fsize_t xfs_ioend_new_eof(xfs_ioend_t *ioend)
{
	xfs_inode_t		*ip = XFS_I(ioend->io_inode);
	xfs_fsize_t		isize;
	xfs_fsize_t		bsize;
	bsize = ioend->io_offset + ioend->io_size;
	isize = MAX(ip->i_size, ip->i_new_size);
	isize = MIN(isize, bsize);
	return isize > ip->i_d.di_size ? isize : 0;
}