VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Darrick J. Wong <darrick.wong@oracle.com> 2015-10-17 16:16:04 -0400 committer: Theodore Ts'o <tytso@mit.edu> 2015-10-17 16:16:04 -0400 commit: 6a797d2737838906f2ea0a31686e87c3151e21ca parent: 8c81bd8f586c46eaf114758a78d82895a2b081c2
Commit Summary:
ext4: call out CRC and corruption errors with specific error codes
Diffstat:
1 file changed, 2 insertions, 1 deletion
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 00f7dbdd64b0..474c1781c0ce 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -1558,6 +1558,7 @@ static int journal_get_superblock(journal_t *journal)
 	/* Check superblock checksum */
 	if (!jbd2_superblock_csum_verify(journal, sb)) {
 		printk(KERN_ERR "JBD2: journal checksum error\n");
+		err = -EFSBADCRC;
 		goto out;
 	}
 
@@ -1649,7 +1650,7 @@ int jbd2_journal_load(journal_t *journal)
 		printk(KERN_ERR "JBD2: journal transaction %u on %s "
 		       "is corrupt.\n", journal->j_failed_commit,
 		       journal->j_devname);
-		return -EIO;
+		return -EFSCORRUPTED;
 	}
 
 	/* OK, we've finished with the dynamic journal bits: