]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/jbd2/journal.c
jbd2: don't wipe the journal on a failed journal checksum
[net-next-2.6.git] / fs / jbd2 / journal.c
index fed85388ee86434509805091a933b34091c50596..af60d98ddd22bb113b637a3855e8ab9feb255fde 100644 (file)
@@ -1248,6 +1248,13 @@ int jbd2_journal_load(journal_t *journal)
        if (jbd2_journal_recover(journal))
                goto recovery_error;
 
+       if (journal->j_failed_commit) {
+               printk(KERN_ERR "JBD2: journal transaction %u on %s "
+                      "is corrupt.\n", journal->j_failed_commit,
+                      journal->j_devname);
+               return -EIO;
+       }
+
        /* OK, we've finished with the dynamic journal bits:
         * reinitialise the dynamic contents of the superblock in memory
         * and reset them on disk. */