/* An error must be cleared or acked to take a FS out of readonly mode.  */
int jbd2_journal_clear_err(journal_t *journal)
/* An error must be cleared or acked to take a FS out of readonly mode.  */
int jbd2_journal_clear_err(journal_t *journal)
{
	int err = 0;
	spin_lock(&journal->j_state_lock);
	if (journal->j_flags & JBD2_ABORT)
		err = -EROFS;
	else
		journal->j_errno = 0;
	spin_unlock(&journal->j_state_lock);
	return err;
}