From: Miguel Ojeda <ojeda@kernel.org>
To: gregkh@linuxfoundation.org
Cc: cem@kernel.org, djwong@kernel.org, hch@lst.de,
patches@lists.linux.dev, stable@vger.kernel.org,
linux-xfs@vger.kernel.org, Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
loongarch@lists.linux.dev
Subject: Re: [PATCH 6.18 0805/1005] xfs: cross-reference the primary superblock
Date: Fri, 6 Nov 2026 08:17:43 +0100 [thread overview]
Message-ID: <20261106071743.90363-1-ojeda@kernel.org> (raw)
In-Reply-To: <20261104211105.901372401@linuxfoundation.org>
On Wed, 04 Nov 2026 16:08:58 -0500 Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
>
> int error;
> + if (agno == 0)
> + goto out_xref;
> +
> error = xfs_sb_read_secondary(mp, sc->tp, agno, &bp);
> +out_xref:
> + xchk_superblock_xref(sc);
> out_pag:
> xfs_perag_put(pag);
> return error;
In loongarch64, like in 7.13.y, I am also seeing the following due to
the code above:
fs/xfs/scrub/agheader.c:123:6: warning: variable 'error' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
123 | if (agno == 0)
| ^~~~~~~~~
fs/xfs/scrub/agheader.c:435:9: note: uninitialized use occurs here
435 | return error;
| ^~~~~
fs/xfs/scrub/agheader.c:123:2: note: remove the 'if' if its condition is always false
123 | if (agno == 0)
| ^~~~~~~~~~~~~~
124 | goto out_xref;
| ~~~~~~~~~~~~~
fs/xfs/scrub/agheader.c:111:13: note: initialize the variable 'error' to silence this warning
111 | int error;
| ^
| = 0
It seems this happened in mainline too, but `error` got initialized in
a later commit:
612d2e7506c3 ("xfs: read primary superblock from disk during scrub")
So something needs to be changed for stable.
Cc: Carlos Maiolino <cem@kernel.org>
Cc: linux-xfs@vger.kernel.org
Cc: Darrick J. Wong <djwong@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Huacai Chen <chenhuacai@kernel.org>
Cc: WANG Xuerui <kernel@xen0n.name>
Cc: loongarch@lists.linux.dev
Cheers,
Miguel
parent reply other threads:[~2026-11-06 7:17 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20261104211105.901372401@linuxfoundation.org>]
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=20261106071743.90363-1-ojeda@kernel.org \
--to=ojeda@kernel.org \
--cc=cem@kernel.org \
--cc=chenhuacai@kernel.org \
--cc=djwong@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=kernel@xen0n.name \
--cc=linux-xfs@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=patches@lists.linux.dev \
--cc=stable@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