VisionFive2 Linux kernel

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

More than 9999 Commits   35 Branches   59 Tags
author: Luis de Bethencourt <luisbg@osg.samsung.com> 2016-08-09 22:23:36 +0100 committer: Luis de Bethencourt <luisbg@osg.samsung.com> 2016-10-08 10:01:31 +0100 commit: bbe1bd0b6bba138eaf441c6c964bde9866da8808 parent: d1a8c70676c7e2cd4b80f494aed17b5813f2be44
Commit Summary:
befs: add check for ag_shift in superblock
Diffstat:
1 file changed, 6 insertions, 0 deletions
diff --git a/fs/befs/super.c b/fs/befs/super.c
index dc13df8de3e8..c36745d2b45f 100644
--- a/fs/befs/super.c
+++ b/fs/befs/super.c
@@ -103,6 +103,13 @@ befs_check_sb(struct super_block *sb)
 		return BEFS_ERR;
 	}
 
+
+	/* ag_shift also encodes the same information as blocks_per_ag in a
+	 * different way, non-fatal consistency check
+	 */
+	if ((1 << befs_sb->ag_shift) != befs_sb->blocks_per_ag)
+		befs_error(sb, "ag_shift disagrees with blocks_per_ag.");
+
 	if (befs_sb->log_start != befs_sb->log_end || befs_sb->flags == BEFS_DIRTY) {
 		befs_error(sb, "Filesystem not clean! There are blocks in the "
 			   "journal. You must boot into BeOS and mount this volume "