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 DEE9F33C503; Wed, 29 Oct 2025 12:20:47 +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=1761740448; cv=none; b=s4vMfz5CANBQeqYiXBQHXUI908XUD6Cv1ZjvkTCGVbrIf5Pnea8boPZWoyvxmerTywYhvjoSGTcnbfrYmPx4QJSqdU8FLlfvIehX1YLu7Y5S35I5gnr7EzuUdhuFUBZqB34RufR2MUYiGAZVRwiIdc4/xSveuISJMIoBxCTAagM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761740448; c=relaxed/simple; bh=jSqJBpD/6utq5kB6r0uVAxUcKbpMKsXXqLyZPGG0ICk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QZXYtHL0Ocdd2jGgpMH1Cd9FtMj/AuMK/pO8rsikl5X0LwWPOmKv3/0nnBxMlmpOzTCmnapc5yHDoWL326SW0nUrGT8IrhGM3Pf8LiFVhl3shDvpeheG8jzK73M8J+plTXrfRe9iCZDRO4eGLRf/Xr6shYwRHVQL6hXME+12158= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Qxgy3DIH; 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="Qxgy3DIH" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B312C4CEFD; Wed, 29 Oct 2025 12:20:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761740447; bh=jSqJBpD/6utq5kB6r0uVAxUcKbpMKsXXqLyZPGG0ICk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=Qxgy3DIHqEwU4kquMlAwvKrC7PGGakpDD+e55kpDEdYHj1FBSQavXnYHK1KQ8Gviy 4GcNeqkSlso0Frx75ImXwblmzisT3iH/9jtMK+aCGZb5WJt/MWFl+Ehqb0HJvw01dM YqO1M9G+vqSZrmwLuv79YrlJiivM03rhH7paXIsbu2r/bYzTV+Looq+1buC433Q99b ldStNN3NaFVaHICj+tisPo7jat1SK5OpTijM/Z9guyksNw584BzGTcpUqioaiAHP4E 5CypqmkTTlUmOzhU7nIXAfpx2+AbimYrIMIuFbeeyv5WyyOq+/OOnwQTRIBPczGnzi 4RjCUNUoMyCeg== From: Christian Brauner Date: Wed, 29 Oct 2025 13:20:15 +0100 Subject: [PATCH v4 02/72] nsfs: use inode_just_drop() Precedence: bulk X-Mailing-List: linux-fsdevel@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: <20251029-work-namespace-nstree-listns-v4-2-2e6f823ebdc0@kernel.org> References: <20251029-work-namespace-nstree-listns-v4-0-2e6f823ebdc0@kernel.org> In-Reply-To: <20251029-work-namespace-nstree-listns-v4-0-2e6f823ebdc0@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=owGbwMvMwCU28Zj0gdSKO4sYT6slMWQysfXcWZKpdvatI8dx39R3dosmVEcUzp7+fpqZ8bIE6 9SlloZTOkpZGMS4GGTFFFkc2k3C5ZbzVGw2ytSAmcPKBDKEgYtTACbCL8jwz2SB9Ybk2nsf1cyV bi9p5bgz8+Oyr+4BslsL182/r7D8kQkjwyvXKxsOOa9l9fnQUemy85no9S23VzBvkDnZaH3s5BU JTl4A 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