mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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 <joseph.qi@linux.alibaba.com> Reviewed-by: Heming Zhao <heming.zhao@suse.com> Cc: Changwei Ge <gechangwei@live.cn> Cc: Joel Becker <jlbec@evilplan.org> Cc: Jun Piao <piaojun@huawei.com> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Mark Fasheh <mark@fasheh.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user