From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E1AE231076A; Fri, 24 Oct 2025 10:53:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761303192; cv=none; b=RmeZ/uEq7P8WbdGM4NrIlm4VaF1r/No9Op++OeYCDVlfV93aC4Yg/NA9u5rfvsM63/X9gPgc0Q1DtWo8oIMy/WnZIDfoHdeg2cMRyi0OFLlDRbNaF8o7+jB0jr9cNPROFJ+R/SGVKczleyNeVeOZ75zDQQINFbktA+b7fX52WMY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761303192; c=relaxed/simple; bh=jSqJBpD/6utq5kB6r0uVAxUcKbpMKsXXqLyZPGG0ICk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=lKcI9LvIxRfK7DhtXF/mR68g8WE/Cw62aMuSFLHX7fTpd8lE8XqBXTAn1S/t0zBDq711UETZvl7Kffihm17BsTLpacRfamgPCawHQIOStdN5tFxsJmwzKlsl/lBp21mZ46jMJCL0b1y3eGMfyX+hFguVerJ1cBP03PEQ18V0eBA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=G31kf5m/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="G31kf5m/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 05E4EC4CEF1; Fri, 24 Oct 2025 10:53:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761303191; bh=jSqJBpD/6utq5kB6r0uVAxUcKbpMKsXXqLyZPGG0ICk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=G31kf5m/LSFYhjq1IOaX4YAEqQY/W/N9UOg3enrdmQcBW5xHVaBfNbQUKr+53eCBz 19uE03qcFrUPj0IkcjEQSFWpax8Mh/0H5AfJ9X3aYys5o1Tm3deZFdy3PoqNVbNHE/ l/nN6v9zTRj1xjZUrciwAzLKNIb1zg95avHq2ZuoXqS0sUwMYsAgxXeEvb2tsHNTyH HWChmysoioyTE1ZlPceSxmg3wWe9vpKLdt+HJPykapA7f14eRmvAR66NXL72lYrvLq FenxHKGA0w/VF2Fj2PTly7DxecjpWNJwO+b1PYxcUCpc1W3XFpmcrdYIxWBVqHigr6 b7Hp8oCpU5POw== From: Christian Brauner Date: Fri, 24 Oct 2025 12:52:31 +0200 Subject: [PATCH v3 02/70] nsfs: use inode_just_drop() Precedence: bulk X-Mailing-List: cgroups@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20251024-work-namespace-nstree-listns-v3-2-b6241981b72b@kernel.org> References: <20251024-work-namespace-nstree-listns-v3-0-b6241981b72b@kernel.org> In-Reply-To: <20251024-work-namespace-nstree-listns-v3-0-b6241981b72b@kernel.org> To: linux-fsdevel@vger.kernel.org, Josef Bacik , Jeff Layton Cc: Jann Horn , Mike Yuan , =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= , Lennart Poettering , Daan De Meyer , Aleksa Sarai , Amir Goldstein , Tejun Heo , Johannes Weiner , Thomas Gleixner , Alexander Viro , Jan Kara , linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, bpf@vger.kernel.org, Eric Dumazet , Jakub Kicinski , netdev@vger.kernel.org, Arnd Bergmann , Christian Brauner X-Mailer: b4 0.15-dev-96507 X-Developer-Signature: v=1; a=openpgp-sha256; l=930; i=brauner@kernel.org; h=from:subject:message-id; bh=jSqJBpD/6utq5kB6r0uVAxUcKbpMKsXXqLyZPGG0ICk=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMWT8jmppq/uX1KRX+qo9LCBeQf1WftD0Ff35oRHt7z4nz vmiwsXZUcrCIMbFICumyOLQbhIut5ynYrNRpgbMHFYmkCEMXJwCMJFtPxn+cG+LfP5CeX7Y6dqA 1TNLuSZaPov4e5ihnpHBo+f+64ux/xn++1mdconXnFj3VDfg8qvq4gsFO2TvJt5Yktbukvw955A cDwA= X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 Currently nsfs uses the default inode_generic_drop() fallback which drops the inode when it's unlinked or when it's unhashed. Since nsfs never hashes inodes that always amounts to dropping the inode. But that's just annoying to have to reason through every time we look at this code. Switch to inode_just_drop() which always drops the inode explicitly. This also aligns the behavior with pidfs which does the same. Signed-off-by: Christian Brauner --- fs/nsfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/nsfs.c b/fs/nsfs.c index 648dc59bef7f..4e77eba0c8fc 100644 --- a/fs/nsfs.c +++ b/fs/nsfs.c @@ -408,6 +408,7 @@ static const struct super_operations nsfs_ops = { .statfs = simple_statfs, .evict_inode = nsfs_evict, .show_path = nsfs_show_path, + .drop_inode = inode_just_drop, }; static int nsfs_init_inode(struct inode *inode, void *data) -- 2.47.3