From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=198.137.202.133 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796045302; b=a365JFoBvj/LkHtoj6xOOo9/A+mZI9lmd2w4xKLa3GNsIlkDozPilXXMiJQHz9I0/lBx lx1Y5CKj6LsmqaBrbR/Z2vfJmRY/1VcrkK7p6/iOqBcNnOF2C59rBY+2nfd8mOx+agv25 YNZ+QGZ/gx9nJUe8ewYuBeZVCo3+rElCOFNwujZF0YdEYfgbNJATPXN9nPqC/SI3i36bu IVx2tvCINsjm56oChqzxjOdTnAxoojFevYlxVvww2rElbHmpYhHs9AM5ccxen1EQdD3N6 sy4TmbwCNqv6wJiiuHx6BJFwXfvJkxApGxj7QcSugCU6jc4fqGR3PCw3PPDVzf9EoZA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796045302; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To:X-SRS-Rewrite; bh=Nm5FHNIF5HlNKzwARIVwELVR1OjnJhCI0XnvQ51wr4c=; b=N5xSnm2MtGi0U0wd5WCYfPQnjWTd1j8W8ixYHignaw8uvi1t2S5sQ+9UC7nPMdIRnmmn qg8yIVu9ENvWYtOPPSJa7myysmBc23wYCu2O0puo+QU3W6BTvO61ngf1nnuy1d5Rhj/79 0pEMD741qithgZZwEqhof5jjDtbMWf7h3qmSWnXksxRMl0XmCd3/mBKKiXE0DV0xv6vrS rAaTyXs9gyR6Qja9ZopJJ39KkIWbXBJcUhpM6QIF3cYvSsrQ0G6EnaAOqDmSZsGX8zybx 2PiXZ3bXGcp+e00Fbd6pmQnT4KmFeCDCMInalyl2Ft2f6tCD3UWlrvadSDi0nx7HniA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=mI6dbpeR; arc=none smtp.remote-ip=198.137.202.133 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE81A606A325; Mon, 30 Nov 2026 13:28:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org CE81A606A325 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=mI6dbpeR DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Nm5FHNIF5HlNKzwARIVwELVR1OjnJhCI0XnvQ51wr4c=; b=mI6dbpeRV1GCSEwLzt+K+MzpH+ eNptXxQN1hDaM85yWKl0MfbqQfMnETFLGBubEeXl3a+/gso2AB5QBPXHuA9vBny9zVl6HqXJDaNUx zKtbyHvyvzr2phxHvlWBKv9YQlHb8fYcWRih3nIhAVWHMke1zj8tezmxFdVHjnOGEbYu1EGB+H59/ WlKZRDQqT0FBZyQ6oNxnGR/BHcCy6s7e4ayqvOPH7uylxQGp+JaQbYEDXIOPoRQSv1etmPCrGx+uu tzjJJY/7UqSJvrrKhLJ0PaJzHVBybAi6T+xIoO/J0twTy+PAWASEUjJXvhu8Liep6MJdLy1OkD097 kCuAcdeQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.100.1 #2 (Red Hat Linux)) id 1xY1QZ-00000004i4o-3rJX; Mon, 30 Nov 2026 13:28:19 +0000 Date: Mon, 30 Nov 2026 05:28:19 -0800 From: Christoph Hellwig To: jianyungao89@gmail.com Cc: linux-xfs@vger.kernel.org, cem@kernel.org, djwong@kernel.org, sandeen@redhat.com, bfoster@redhat.com, ast@kernel.org, ishiyama@hpc.is.uec.ac.jp, linux-kernel@vger.kernel.org Subject: Re: [PATCH] xfs: remove redundant ASSERT in __xfs_bunmapi Message-ID: References: <20261127084016.18418-1-jianyungao89@gmail.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261127084016.18418-1-jianyungao89@gmail.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Fri, Nov 27, 2026 at 04:40:16PM +0800, jianyungao89@gmail.com wrote: > From: Jianyun Gao > > In __xfs_bunmapi(), the code checks if the fork is in btree format and > then immediately asserts the same condition: > > if (ifp->if_format == XFS_DINODE_FMT_BTREE) { > ASSERT(ifp->if_format == XFS_DINODE_FMT_BTREE); > cur = xfs_bmbt_init_cursor(mp, tp, ip, whichfork); > > The ASSERT was originally meaningful when the if-condition tested a > different property (the XFS_IFBROOT flag), serving as a cross-check > that IFBROOT implies BTREE format. commit ac1e067211d14 ("xfs: remove > XFS_IFBROOT") replaced the flag check with a direct format comparison, > making the ASSERT tautological. Remove it. > > Fixes: ac1e067211d14 ("xfs: remove XFS_IFBROOT") The change looks good, but this is a lot of text for a trivial fix. And the Fixes tag does not belong here - nothing is fixed here, this just removed a little bit of redundant code.