[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20251025123218.3997866-2-joseph.qi@linux.alibaba.com>
Date: Sat, 25 Oct 2025 20:32:18 +0800
From: Joseph Qi <joseph.qi@...ux.alibaba.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Heming Zhao <heming.zhao@...e.com>
Cc: ocfs2-devel@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] 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.
Signed-off-by: Joseph Qi <joseph.qi@...ux.alibaba.com>
---
fs/ocfs2/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 0a0a96054bfe..dc4044a565b5 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);
--
2.39.3
Powered by blists - more mailing lists