Skip to content

Commit f921da2

Browse files
zhaohemakpm00
authored andcommitted
ocfs2: fix incorrect CPU endianness conversion causing mount failure
Commit 23aab03 ("ocfs2: fix UBSAN warning in ocfs2_verify_volume()") introduced a regression bug. The blksz_bits value is already converted to CPU endian in the previous code; therefore, the code shouldn't use le32_to_cpu() anymore. Link: https://lkml.kernel.org/r/[email protected] Fixes: 23aab03 ("ocfs2: fix UBSAN warning in ocfs2_verify_volume()") Signed-off-by: Heming Zhao <[email protected]> Reviewed-by: Joseph Qi <[email protected]> Cc: Mark Fasheh <[email protected]> Cc: Joel Becker <[email protected]> Cc: Junxiao Bi <[email protected]> Cc: Changwei Ge <[email protected]> Cc: Jun Piao <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 6e8e042 commit f921da2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ocfs2/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,7 @@ static int ocfs2_verify_volume(struct ocfs2_dinode *di,
22852285
mlog(ML_ERROR, "found superblock with incorrect block "
22862286
"size bits: found %u, should be 9, 10, 11, or 12\n",
22872287
blksz_bits);
2288-
} else if ((1 << le32_to_cpu(blksz_bits)) != blksz) {
2288+
} else if ((1 << blksz_bits) != blksz) {
22892289
mlog(ML_ERROR, "found superblock with incorrect block "
22902290
"size: found %u, should be %u\n", 1 << blksz_bits, blksz);
22912291
} else if (le16_to_cpu(di->id2.i_super.s_major_rev_level) !=

0 commit comments

Comments
 (0)