Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59C9D2D877F for ; Wed, 11 Feb 2026 17:41:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770831666; cv=none; b=jNSetIm0d0pORZjwswN6sMWaDRek6oKzpTon8oOR7kpt9ci0ZZBCMnZlGJa927TKjnF4rIMvAJZ7XZTzRpdWvtYUcJRNchLjuxCO30O5J+Tbb0kq0RtUlylzy5TuTVox6ayNSfsnCfavbqAquDzjmMe1uoCTDMhmRG024E8P4GI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770831666; c=relaxed/simple; bh=mYP6d8Qfc+CnoeDOr7xcS/dty8isEbbTkw81aHheEas=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GiceAY/OY4gY06tCxXiMOOyzptjONo2+DKAwVnO8jZXO8eb0LSL6zP6pO2dyc8r+nUtHn9eQ0MvxA3M3Y14HRIAGXzl+vFCTIaRiFh/p20lrSC/Z1KTUv5kGG1yf5zIKrYfvycHQBuuoa+gR2vcHV2ZoN06o0gzrBiE6e4gstwE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bur.io; spf=pass smtp.mailfrom=bur.io; dkim=pass (2048-bit key) header.d=bur.io header.i=@bur.io header.b=jxGu8Eh2; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=GYgm9Tnx; arc=none smtp.client-ip=202.12.124.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bur.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bur.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bur.io header.i=@bur.io header.b="jxGu8Eh2"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="GYgm9Tnx" Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 95A7A7A013B; Wed, 11 Feb 2026 12:41:04 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Wed, 11 Feb 2026 12:41:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bur.io; h=cc:cc :content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1770831664; x=1770918064; bh=2O/Lwl2VPB 2Jw0k9g8fBUlI40bR5kaI/6HamjSmGafg=; b=jxGu8Eh2dL44EQOkeTvh8nHq67 rAvUoy89X+U7fEBjzAP+jrBm0DRaU7LFhCrIJ2FzRQPcjpHmPFxxkGjZ4DZ+RtAb I6nJtv5KFNrqo8UsvAA0Uki7lopxWpoDALfvUsETdP8MeDNj5afAspOyQvaB6HWI yEAAVoWOCysBwJAoLjkb3V9L0Ap6yGoHGOK40MlqYic6/8FxUZ0utIFLn2IegWun 18WB8wpCqYxSpFKvA1ArZDrZ6P422SsdaCmTN3dizk/c+axIdZe11CrAIOpWBFVC py289Tzpm6b5d56Kz7drX7yDpltntkZvXCvpUnQZH9TZwKayZj9qcJPHPoIg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1770831664; x=1770918064; bh=2O/Lwl2VPB2Jw0k9g8fBUlI40bR5kaI/6Ha mjSmGafg=; b=GYgm9Tnxwg+n7FT/GJM2w/Tw+si+tVLmvsK6e7URv/SRTmmGSXw DQcN1wNLxrMqIpm6sL6Pcb3P4e7zZxXv7jtKK/7eDy9H13dYWk8HcfuFDOswfDPX 5yBJ3HjDUr+xLQpZlz07xRTzlZJxhm8M7Fque1sd6RprmXk8ZOrGsBoMBEDzBH5K Ck5kYXqNi9ji+TWG1tok07hCJY+oxEENWKjFqiBAyo7/XYfHM/0jFlrWzZDG3O+n 7/2jNnlyieFQY3H4pvSnTywGCzXyGB74/C8eV74zHD4N3CO/uTE/EDCFIDUTHxNJ +rIxb3QHAHX/h04V/Je/O65e691koW3N3og== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvtdefudejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefukfhfgggtuggjsehttdertd dttddvnecuhfhrohhmpeeuohhrihhsuceuuhhrkhhovhcuoegsohhrihhssegsuhhrrdhi oheqnecuggftrfgrthhtvghrnhepkedvkeffjeellefhveehvdejudfhjedthfdvveeiie eiudfguefgtdejgfefleejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepsghorhhishessghurhdrihhopdhnsggprhgtphhtthhopedvpdhmoh guvgepshhmthhpohhuthdprhgtphhtthhopehfughmrghnrghnrgeskhgvrhhnvghlrdho rhhgpdhrtghpthhtoheplhhinhhugidqsghtrhhfshesvhhgvghrrdhkvghrnhgvlhdroh hrgh X-ME-Proxy: Feedback-ID: i083147f8:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Feb 2026 12:41:04 -0500 (EST) Date: Wed, 11 Feb 2026 09:40:14 -0800 From: Boris Burkov To: fdmanana@kernel.org Cc: linux-btrfs@vger.kernel.org Subject: Re: [PATCH v2 0/3] btrfs: add missing NULL checks when searching for roots Message-ID: <20260211174014.GC1458991@zen.localdomain> References: Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Tue, Feb 10, 2026 at 11:57:47AM +0000, fdmanana@kernel.org wrote: > From: Filipe Manana > > 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. A few nits/questions on the patches, but please feel free to add Reviewed-by: Boris Burkov regardless of how you choose to respond to those. Thanks, Boris > > 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 >