From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Carlos Maiolino <cem@kernel.org>, xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs: fix simplify extent lookup in xfs_can_free_eofblocks
Date: Wed, 2 Oct 2024 14:16:14 -0700 [thread overview]
Message-ID: <20241002211614.GE21853@frogsfrogsfrogs> (raw)
In-Reply-To: <Zv1ilUMwSOVeT1Q_@infradead.org>
On Wed, Oct 02, 2024 at 08:11:17AM -0700, Christoph Hellwig wrote:
> > + if (ip->i_delayed_blks)
> > + found_blocks = true;
> > + else if (xfs_iext_lookup_extent(ip, &ip->i_df, end_fsb, &icur, &imap))
> > found_blocks = true;
>
> This could be simplified a little bit by doing:
>
> if (ip->i_delayed_blks ||
> xfs_iext_lookup_extent(ip, &ip->i_df, end_fsb, &icur, &imap))
> found_blocks = true;
>
> but otherwise looks good:
Oops, heh, I thought I'd forgotten something. :(
V2 soon, though really there's a pile more fsdax corruption fixes so
heh.
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Thanks!
--D
prev parent reply other threads:[~2024-10-02 21:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-02 14:59 [PATCH] xfs: fix simplify extent lookup in xfs_can_free_eofblocks Darrick J. Wong
2024-10-02 15:11 ` Christoph Hellwig
2024-10-02 21:16 ` Darrick J. Wong [this message]
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=20241002211614.GE21853@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=hch@infradead.org \
--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;
as well as URLs for NNTP newsgroup(s).