From: Joseph Qi Date: Sat, 25 Oct 2025 12:32:18 +0000 (+0800) Subject: ocfs2: convert to host endian in ocfs2_validate_inode_block X-Git-Tag: v6.19-rc1~70^2~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e89373cec09af28dd54fc5eed00cde34992f8e2;p=thirdparty%2Fkernel%2Flinux.git ocfs2: convert to host endian in ocfs2_validate_inode_block Convert to host endian when checking OCFS2_VALID_FL to keep consistent with other checks. Link: https://lkml.kernel.org/r/20251025123218.3997866-2-joseph.qi@linux.alibaba.com Signed-off-by: Joseph Qi Reviewed-by: Heming Zhao Cc: Changwei Ge Cc: Joel Becker Cc: Jun Piao Cc: Junxiao Bi Cc: Mark Fasheh Signed-off-by: Andrew Morton --- diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c index 0a0a96054bfec..dc4044a565b5d 100644 --- a/fs/ocfs2/inode.c +++ b/fs/ocfs2/inode.c @@ -1481,7 +1481,7 @@ int ocfs2_validate_inode_block(struct super_block *sb, goto bail; } - if (!(di->i_flags & cpu_to_le32(OCFS2_VALID_FL))) { + if (!(le32_to_cpu(di->i_flags) & OCFS2_VALID_FL)) { rc = ocfs2_error(sb, "Invalid dinode #%llu: OCFS2_VALID_FL not set\n", (unsigned long long)bh->b_blocknr);