/* If the journal has been aborted on this mount time -EROFS will be returned.  */
int journal_errno(journal_t *journal)
/* If the journal has been aborted on this mount time -EROFS will be returned.  */
int journal_errno(journal_t *journal)
{
	int err;
	spin_lock(&journal->j_state_lock);
	if (journal->j_flags & JFS_ABORT)
		err = -EROFS;
	else
		err = journal->j_errno;
	spin_unlock(&journal->j_state_lock);
	return err;
}