From: Allison Henderson <allison.henderson@oracle.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: fix backwards endian conversion in scrub
Date: Mon, 25 Feb 2019 11:09:14 -0700 [thread overview]
Message-ID: <94dc02ba-ba62-012c-40b6-afb5d1bb201d@oracle.com> (raw)
In-Reply-To: <155111650186.15126.5896442701967175896.stgit@magnolia>
On 2/25/19 10:41 AM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Fix a backwards endian conversion of a constant.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
> fs/xfs/scrub/agheader.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>
> diff --git a/fs/xfs/scrub/agheader.c b/fs/xfs/scrub/agheader.c
> index 9d4e8293d37e..ddf06bfaa29d 100644
> --- a/fs/xfs/scrub/agheader.c
> +++ b/fs/xfs/scrub/agheader.c
> @@ -399,7 +399,7 @@ xchk_agf_xref_cntbt(
> if (!xchk_should_check_xref(sc, &error, &sc->sa.cnt_cur))
> return;
> if (!have) {
> - if (agf->agf_freeblks != be32_to_cpu(0))
> + if (agf->agf_freeblks != cpu_to_be32(0))
> xchk_block_xref_set_corrupt(sc, sc->sa.agf_bp);
> return;
> }
>
Good catch. I suppose there's not as much need to do the conversion if
the value is 0? But I think the call helps to make clear that the value
is supposed to be in big endian.
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
next prev parent reply other threads:[~2019-02-25 18:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-25 17:41 [PATCH 1/2] xfs: fix uninitialized error variables Darrick J. Wong
2019-02-25 17:41 ` [PATCH 2/2] xfs: fix backwards endian conversion in scrub Darrick J. Wong
2019-02-25 18:09 ` Allison Henderson [this message]
2019-02-25 18:15 ` Darrick J. Wong
2019-02-25 17:53 ` [PATCH 1/2] xfs: fix uninitialized error variables Allison Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=94dc02ba-ba62-012c-40b6-afb5d1bb201d@oracle.com \
--to=allison.henderson@oracle.com \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox