From: Christoph Hellwig <hch@infradead.org>
To: Long Li <leo.lilong@huawei.com>
Cc: djwong@kernel.org, cem@kernel.org, linux-xfs@vger.kernel.org,
david@fromorbit.com, yi.zhang@huawei.com, houtao1@huawei.com,
yangerkun@huawei.com, lonuxli.64@gmail.com
Subject: Re: [PATCH v3 2/2] xfs: remove redundant validation in xlog_recover_attri_commit_pass2
Date: Sun, 22 Mar 2026 23:15:16 -0700 [thread overview]
Message-ID: <acDadB4tpuGhcIfw@infradead.org> (raw)
In-Reply-To: <20260320021130.2936657-3-leo.lilong@huawei.com>
On Fri, Mar 20, 2026 at 10:11:30AM +0800, Long Li wrote:
> Remove the redundant post-parse validation switch. By the time that
> block is reached, xfs_attri_validate() has already guaranteed all name
> lengths are non-zero via xfs_attri_validate_namelen(), and
> xfs_attri_validate_name_iovec() has already returned -EFSCORRUPTED for
> NULL names. For the REMOVE case, attr_value and value_len are
> structurally guaranteed to be NULL/zero because the parsing loop only
> populates them when value_len != 0. All checks in that switch are
> therefore dead code.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2026-03-23 6:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 2:11 [PATCH v3 0/2] xfs: fixes and clean up for attr item Long Li
2026-03-20 2:11 ` [PATCH v3 1/2] xfs: fix ri_total validation in xlog_recover_attri_commit_pass2 Long Li
2026-03-23 6:15 ` Christoph Hellwig
2026-03-23 7:33 ` Long Li
2026-03-20 2:11 ` [PATCH v3 2/2] xfs: remove redundant " Long Li
2026-03-23 6:15 ` Christoph Hellwig [this message]
2026-03-23 10:47 ` [PATCH v3 0/2] xfs: fixes and clean up for attr item Carlos Maiolino
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=acDadB4tpuGhcIfw@infradead.org \
--to=hch@infradead.org \
--cc=cem@kernel.org \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=houtao1@huawei.com \
--cc=leo.lilong@huawei.com \
--cc=linux-xfs@vger.kernel.org \
--cc=lonuxli.64@gmail.com \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
/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