From: David Sterba <dsterba@suse.cz>
To: Zhen Ni <zhen.ni@easystack.cn>
Cc: clm@fb.com, dsterba@suse.com, wqu@suse.com, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: remove assertions after btrfs_bio struct changes
Date: Thu, 18 Dec 2025 14:57:25 +0100 [thread overview]
Message-ID: <20251218135725.GO3195@suse.cz> (raw)
In-Reply-To: <20251218122215.1044381-1-zhen.ni@easystack.cn>
On Thu, Dec 18, 2025 at 08:22:15PM +0800, Zhen Ni wrote:
> Commit 81cea6cd7041 ("btrfs: remove btrfs_bio::fs_info by extracting it
> from btrfs_bio::inode") modified the btrfs_bio structure to make the
> inode field mandatory, making these assertions redundant:
>
> - btrfs_check_read_bio(): inode is validated by btrfs_bio_init()
> - btrfs_submit_bbio(): condition always passes since inode is never NULL
>
> Remove these obsolete checks.
The assertions may be redundant and their purpose is to catch accidental
changes to code or explicitly list some critical assumptions. We'd like
to have more rather than fewer of them.
next prev parent reply other threads:[~2025-12-18 13:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 12:22 [PATCH] btrfs: remove assertions after btrfs_bio struct changes Zhen Ni
2025-12-18 13:57 ` David Sterba [this message]
2025-12-18 14:05 ` David Sterba
2025-12-19 2:50 ` zhen.ni
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=20251218135725.GO3195@suse.cz \
--to=dsterba@suse.cz \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.com \
--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