diff options
author | Theodore Ts'o <tytso@mit.edu> | 2012-08-05 19:04:57 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-08-05 19:04:57 -0400 |
commit | d796c52ef0b71a988364f6109aeb63d79c5b116b (patch) | |
tree | 657ec500327ce4095000d74e9d826c2073b9dc6d /include/linux/jbd2.h | |
parent | 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff) | |
download | linux-d796c52ef0b71a988364f6109aeb63d79c5b116b.tar.gz linux-d796c52ef0b71a988364f6109aeb63d79c5b116b.tar.bz2 linux-d796c52ef0b71a988364f6109aeb63d79c5b116b.zip |
ext4: make sure the journal sb is written in ext4_clear_journal_err()
After we transfer set the EXT4_ERROR_FS bit in the file system
superblock, it's not enough to call jbd2_journal_clear_err() to clear
the error indication from journal superblock --- we need to call
jbd2_journal_update_sb_errno() as well. Otherwise, when the root file
system is mounted read-only, the journal is replayed, and the error
indicator is transferred to the superblock --- but the s_errno field
in the jbd2 superblock is left set (since although we cleared it in
memory, we never flushed it out to disk).
This can end up confusing e2fsck. We should make e2fsck more robust
in this case, but the kernel shouldn't be leaving things in this
confused state, either.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@kernel.org
Diffstat (limited to 'include/linux/jbd2.h')
-rw-r--r-- | include/linux/jbd2.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index f334c7fab967..3efc43f3f162 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h @@ -1125,6 +1125,7 @@ extern int jbd2_journal_destroy (journal_t *); extern int jbd2_journal_recover (journal_t *journal); extern int jbd2_journal_wipe (journal_t *, int); extern int jbd2_journal_skip_recovery (journal_t *); +extern void jbd2_journal_update_sb_errno(journal_t *); extern void jbd2_journal_update_sb_log_tail (journal_t *, tid_t, unsigned long, int); extern void __jbd2_journal_abort_hard (journal_t *); |