Commit efbe9b14 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] JBD: avoid panic on corrupted journal superblock

Don't panic if the journal superblock is wrecked: just fail the mount.
parent 83a6b2ed
...@@ -137,7 +137,10 @@ static int jread(struct buffer_head **bhp, journal_t *journal, ...@@ -137,7 +137,10 @@ static int jread(struct buffer_head **bhp, journal_t *journal,
*bhp = NULL; *bhp = NULL;
J_ASSERT (offset < journal->j_maxlen); if (offset >= journal->j_maxlen) {
printk(KERN_ERR "JBD: corrupted journal superblock\n");
return -EIO;
}
err = journal_bmap(journal, offset, &blocknr); err = journal_bmap(journal, offset, &blocknr);
......
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