Commit b8e2d18e authored by Eric Lammerts's avatar Eric Lammerts Committed by Linus Torvalds

[PATCH] ext3: commit superblock before panicking

I have a problem with errors=panic on ext3.  When a panic occurs, the error
event is not recorded anywhere.  So after the reboot, e2fsck doesn't kick
in, the file system gets mounted again and the box panics again...

Patch below moves the ERRORS_PANIC test down a bit so the journal is
aborted before panic() is called.
Signed-off-by: default avatarEric Lammerts <eric@lammerts.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e3945630
......@@ -155,9 +155,6 @@ static void ext3_handle_error(struct super_block *sb)
if (sb->s_flags & MS_RDONLY)
return;
if (test_opt (sb, ERRORS_PANIC))
panic ("EXT3-fs (device %s): panic forced after error\n",
sb->s_id);
if (test_opt (sb, ERRORS_RO)) {
printk (KERN_CRIT "Remounting filesystem read-only\n");
sb->s_flags |= MS_RDONLY;
......@@ -168,6 +165,9 @@ static void ext3_handle_error(struct super_block *sb)
if (journal)
journal_abort(journal, -EIO);
}
if (test_opt(sb, ERRORS_PANIC))
panic("EXT3-fs (device %s): panic forced after error\n",
sb->s_id);
ext3_commit_super(sb, es, 1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment