From: Eric Lammerts 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: Eric Lammerts Signed-off-by: Andrew Morton --- 25-akpm/fs/ext3/super.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff -puN fs/ext3/super.c~ext3-commit-superblock-before-panicking fs/ext3/super.c --- 25/fs/ext3/super.c~ext3-commit-superblock-before-panicking Tue Jan 18 16:01:22 2005 +++ 25-akpm/fs/ext3/super.c Tue Jan 18 16:02:20 2005 @@ -155,9 +155,6 @@ static void ext3_handle_error(struct sup 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 sup 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); } _