summaryrefslogtreecommitdiff
path: root/e2fsck/journal.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2001-08-07 10:17:41 -0400
committerTheodore Ts'o <tytso@mit.edu>2001-08-07 10:17:41 -0400
commitc0a083fac3b8f03ae15f5bf30c230c015538051e (patch)
tree7f8863b9d62cca070e288224e0a0c750e96391db /e2fsck/journal.c
parent89a6ebd524891f332aad8ca0281935159ddc1217 (diff)
downloade2fsprogs-c0a083fac3b8f03ae15f5bf30c230c015538051e.tar.gz
* journal.c (recover_ext3_journal): If s_errno is set in the
journal superblock, set the EXT2_ERROR_FS flag in the filesystem superblock after the journal is run.
Diffstat (limited to 'e2fsck/journal.c')
-rw-r--r--e2fsck/journal.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/e2fsck/journal.c b/e2fsck/journal.c
index b44b60af..fd719213 100644
--- a/e2fsck/journal.c
+++ b/e2fsck/journal.c
@@ -652,6 +652,16 @@ static errcode_t recover_ext3_journal(e2fsck_t ctx)
goto errout;
retval = -journal_recover(journal);
+ if (retval)
+ goto errout;
+
+ if (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, 1);
+ }
+
errout:
e2fsck_journal_release(ctx, journal, 1, 0);
return retval;