am 0a02698f: am df5d2e2b: e2fsck: handle an already recovered journal with a non-zero s_error field

* commit '0a02698f2851f419aa75536afb5f040a5c9ce002':
  e2fsck: handle an already recovered journal with a non-zero s_error field
diff --git a/e2fsck/journal.c b/e2fsck/journal.c
index b741eb9..bf15cfa 100644
--- a/e2fsck/journal.c
+++ b/e2fsck/journal.c
@@ -799,6 +799,19 @@
 		 */
 	}
 
+	/*
+	 * If we don't need to do replay the journal, check to see if
+	 * the journal's errno is set; if so, we need to mark the file
+	 * system as being corrupt and clear the journal's s_errno.
+	 */
+	if (!(sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER) &&
+	    journal->j_superblock->s_errno) {
+		ctx->fs->super->s_state |= EXT2_ERROR_FS;
+		ext2fs_mark_super_dirty(ctx->fs);
+		journal->j_superblock->s_errno = 0;
+		mark_buffer_dirty(journal->j_sb_buffer);
+	}
+
 	e2fsck_journal_release(ctx, journal, reset, 0);
 	return retval;
 }