diff options
-rw-r--r-- | e2fsck/journal.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/e2fsck/journal.c b/e2fsck/journal.c index 155857d9..95affda3 100644 --- a/e2fsck/journal.c +++ b/e2fsck/journal.c @@ -798,6 +798,19 @@ no_has_journal: */ } + /* + * 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; } |