From: fdmanana@kernel.org
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/3] btrfs: add missing NULL checks when searching for roots
Date: Tue, 10 Feb 2026 11:57:47 +0000 [thread overview]
Message-ID: <cover.1770724034.git.fdmanana@suse.com> (raw)
In-Reply-To: <cover.1770580436.git.fdmanana@suse.com>
From: Filipe Manana <fdmanana@suse.com>
Remove a wrong but harmless expression before loading an extent root and
add missing error handling for some root search functions, which can
return NULL when using the extent tree v2 feature. Some places have the
NULL checks already, but many others completely ignore it. Chris recently
reported this with his AI generated reviews.
V2: Fixed a return without mutex unlock in patch 2/3, updated patch 3/3
to log the logical bytenr of a delayed ref in case we can't find
the csum root.
Filipe Manana (3):
btrfs: remove bogus root search condition in load_extent_tree_free()
btrfs: check for NULL root after calls to btrfs_extent_root()
btrfs: check for NULL root after calls to btrfs_csum_root()
fs/btrfs/backref.c | 28 +++++++++++
fs/btrfs/block-group.c | 39 ++++++++++++++-
fs/btrfs/disk-io.c | 17 ++++++-
fs/btrfs/extent-tree.c | 98 ++++++++++++++++++++++++++++++++++++--
fs/btrfs/file-item.c | 7 +++
fs/btrfs/free-space-tree.c | 9 +++-
fs/btrfs/inode.c | 18 ++++++-
fs/btrfs/qgroup.c | 8 ++++
fs/btrfs/raid56.c | 12 ++++-
fs/btrfs/relocation.c | 30 +++++++++++-
fs/btrfs/tree-log.c | 21 ++++++++
fs/btrfs/zoned.c | 7 +++
12 files changed, 278 insertions(+), 16 deletions(-)
--
2.47.2
next prev parent reply other threads:[~2026-02-10 11:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-08 20:00 [PATCH 0/3] btrfs: add missing NULL checks when searching for roots fdmanana
2026-02-08 20:00 ` [PATCH 1/3] btrfs: remove bogus root search condition in load_extent_tree_free() fdmanana
2026-02-08 20:00 ` [PATCH 2/3] btrfs: check for NULL root after calls to btrfs_extent_root() fdmanana
2026-02-09 15:41 ` Filipe Manana
2026-02-08 20:00 ` [PATCH 3/3] btrfs: check for NULL root after calls to btrfs_csum_root() fdmanana
2026-02-10 11:57 ` fdmanana [this message]
2026-02-10 11:57 ` [PATCH v2 1/3] btrfs: remove bogus root search condition in load_extent_tree_free() fdmanana
2026-02-10 11:57 ` [PATCH v2 2/3] btrfs: check for NULL root after calls to btrfs_extent_root() fdmanana
2026-02-11 17:34 ` Boris Burkov
2026-02-11 17:50 ` Filipe Manana
2026-02-10 11:57 ` [PATCH v2 3/3] btrfs: check for NULL root after calls to btrfs_csum_root() fdmanana
2026-02-11 17:39 ` Boris Burkov
2026-02-11 17:53 ` Filipe Manana
2026-02-11 17:40 ` [PATCH v2 0/3] btrfs: add missing NULL checks when searching for roots Boris Burkov
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=cover.1770724034.git.fdmanana@suse.com \
--to=fdmanana@kernel.org \
--cc=linux-btrfs@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