[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <honfnctqux4wuiv4dzjzwklavw2uxqyonyyvo3wgb7bzhrseik@bn6ehubxfiuw>
Date: Mon, 27 Oct 2025 13:54:56 +0800
From: Heming Zhao <heming.zhao@...e.com>
To: Joseph Qi <joseph.qi@...ux.alibaba.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, ocfs2-devel@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] ocfs2: convert to host endian in
ocfs2_validate_inode_block
On Sat, Oct 25, 2025 at 08:32:18PM +0800, Joseph Qi wrote:
> 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>
Reviewed-by: Heming Zhao <heming.zhao@...e.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