From: David Sterba <dsterba@suse.cz>
To: Zhen Ni <zhen.ni@easystack.cn>
Cc: clm@fb.com, dsterba@suse.com, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: simplify check for zoned NODATASUM writes in btrfs_submit_chunk()
Date: Sat, 20 Dec 2025 01:09:20 +0100 [thread overview]
Message-ID: <20251220000920.GC3195@suse.cz> (raw)
In-Reply-To: <20251219073649.1157563-1-zhen.ni@easystack.cn>
On Fri, Dec 19, 2025 at 03:36:49PM +0800, Zhen Ni wrote:
> This function already dereferences 'inode' multiple times earlier,
> making the additional NULL check at line 840 redundant since the
> function would have crashed already if inode were NULL.
>
> After commit 81cea6cd7041 ("btrfs: remove btrfs_bio::fs_info by
> extracting it from btrfs_bio::inode"), the btrfs_bio::inode field is
> mandatory for all btrfs_bio allocations and is guaranteed to be
> non-NULL.
>
> Simplify the condition for allocating dummy checksums for zoned
> NODATASUM data by removing the unnecessary 'inode &&' check.
>
> Signed-off-by: Zhen Ni <zhen.ni@easystack.cn>
Added to for-next, thanks.
prev parent reply other threads:[~2025-12-20 0:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-19 7:36 [PATCH] btrfs: simplify check for zoned NODATASUM writes in btrfs_submit_chunk() Zhen Ni
2025-12-19 12:57 ` Johannes Thumshirn
2025-12-20 0:09 ` David Sterba [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=20251220000920.GC3195@suse.cz \
--to=dsterba@suse.cz \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=zhen.ni@easystack.cn \
/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