/* Returns 0 if we managed to create more room. If we can't create more room, and the transaction must be restarted we return 1.  */
static int try_to_extend_transaction(handle_t *handle, struct inode *inode)
/* Returns 0 if we managed to create more room. If we can't create more room, and the transaction must be restarted we return 1.  */
static int try_to_extend_transaction(handle_t *handle, struct inode *inode)
{
	if (handle->h_buffer_credits > EXT3_RESERVE_TRANS_BLOCKS)
		return 0;
	if (!ext3_journal_extend(handle, blocks_for_truncate(inode)))
		return 0;
	return 1;
}