public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] btrfs: add missing NULL checks when searching for roots
@ 2026-02-08 20:00 fdmanana
  2026-02-08 20:00 ` [PATCH 1/3] btrfs: remove bogus root search condition in load_extent_tree_free() fdmanana
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: fdmanana @ 2026-02-08 20:00 UTC (permalink / raw)
  To: linux-btrfs

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.

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     | 97 ++++++++++++++++++++++++++++++++++++--
 fs/btrfs/file-item.c       |  7 +++
 fs/btrfs/free-space-tree.c |  7 +++
 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, 276 insertions(+), 15 deletions(-)

-- 
2.47.2


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-02-11 17:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH v2 0/3] btrfs: add missing NULL checks when searching for roots fdmanana
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox