OSDN Git Service
(root)
/
linux-kernel-docs
/
linux-2.4.36.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c7a224
)
[PATCH] JBD: avoid panic on corrupted journal superblock (from akpm)
author
Willy TARREAU
<willy@pcw.(none)>
Sun, 21 May 2006 23:08:34 +0000
(19:08 -0400)
committer
Marcelo Tosatti
<marcelo@dmt.cnet>
Fri, 26 May 2006 19:35:58 +0000
(16:35 -0300)
Initial patch from Andrew Morton merged into 2.6 :
Don't panic if the journal superblock is wrecked: just fail the mount.
fs/jbd/recovery.c
patch
|
blob
|
history
diff --git
a/fs/jbd/recovery.c
b/fs/jbd/recovery.c
index
c02a0ef
..
d18df61
100644
(file)
--- a/
fs/jbd/recovery.c
+++ b/
fs/jbd/recovery.c
@@
-138,8
+138,11
@@
static int jread(struct buffer_head **bhp, journal_t *journal,
*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);
if (err) {