From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from flow-a1-smtp.messagingengine.com (flow-a1-smtp.messagingengine.com [103.168.172.136]) (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 DA33E1A76BB; Mon, 23 Feb 2026 01:12:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.136 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771809158; cv=none; b=UTuIDq4mqFO0zluFYt6WGUewiyJTubWya910COoAsTLp+pnZCmoMclW8Jk+svjS7v7ezstjjWe/WTTxxJgCLFAbmR9qsLDhMpKRJ2yZdCrCwFLfO00cEbsppnynNVxnW8MqEuDc32fLW5WpmLoxqMxHqzHtJMkG/CXOHEhKI1jo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771809158; c=relaxed/simple; bh=JpV1NuU9nwQ+TlujBiNkZGL25g2X4UIS/xw10PvqQ6k=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Od+FdxJDPPUdo9b0AH+u0TqvcP7Exn6b3ZPLsvC7f1lcnDpIqe5b5KgvGAuhCias8t1QQmJ9b4p9+Wd78RjPZL6TT3QKImlBEUYh5np4vwcVlninLc7jXw0JPwuiYKaNlLzed2pPy+ZfVu3bz05T5yKHgTAntW2RDh1ddSfZlVc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ownmail.net; spf=pass smtp.mailfrom=ownmail.net; dkim=pass (2048-bit key) header.d=ownmail.net header.i=@ownmail.net header.b=MtC+FEAj; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=P5eLcKsZ; arc=none smtp.client-ip=103.168.172.136 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ownmail.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ownmail.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ownmail.net header.i=@ownmail.net header.b="MtC+FEAj"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="P5eLcKsZ" Received: from phl-compute-03.internal (phl-compute-03.internal [10.202.2.43]) by mailflow.phl.internal (Postfix) with ESMTP id 24DBC13807AC; Sun, 22 Feb 2026 20:12:36 -0500 (EST) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Sun, 22 Feb 2026 20:12:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ownmail.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:reply-to:subject :subject:to:to; s=fm3; t=1771809156; x=1771816356; bh=Q+mh2yyGZq 5WunF2kc+4OeWErNogZ7jVroU8N40m4fY=; b=MtC+FEAjwHg9g3e3ctY3Ybi2vS nxSQCxxNFDp6j0UfHeq+x1Z9sq/Trs1NhQyPQu9KmnGIV2OY0xmBTk0KPqRgLdh8 eVVSwKFVunpeH/DqnRvnJf5oMa9lldCsG3pARA+2Av3Sgw2+zaEPkLrk113Rcf/w qErWtkNVfCbXLLsZLvVYNrtdIZuIZP9cqNDNtOjNHY8UvDpQtxtaIy7adti/h+da IDC9mLLw9b9Bb/opjTSFaP4Zq3CpB3xfDwYE0FpEPaZtmfTQu8b9yNkNqaq8R1mN T8MRLbuygGs0tIK8UKJ9s6W3kf/rlW5/Ewo1vUsqGMCbd2D7bU62RPBGNhng== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:reply-to:subject :subject:to:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1771809156; x=1771816356; bh=Q+mh2yyGZq5WunF2kc+4OeWErNog Z7jVroU8N40m4fY=; b=P5eLcKsZ1fQ5I3g7yyn3VAlTrgB0Sg2eRZTajpvp9s7o I5mZVUCjoSpLIU8GO+INw+7P2q6MeXEJCqs9H+CggS7+W78nyTzJ4vgjJ/ZMXu4/ UWh1oIRu/OZTStB9+7kGTR9FRQIGJyjrSvX1igiXoCmqY1xfhPwLFVsMVTJgcFSr PEtAdVe9DBFykt2EN3hwy3sJkKSDv+R/jj0w1+S49hxZjtqNygyNVByyXTt32S8y zjfNGaJ0fkKlnqJDnfJN5LnvzATly5BmpG7FsEXW0E0OWWXhYTnHTu2+QYF/vYtW 3E/9zFqw5VBsOdYb0o/msxHkFcRtT7IqTbmo5LAebw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgddvfeehkeegucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefufffkofhrggfgsedtkeertdertddtnecuhfhrohhmpefpvghilheurhho fihnuceonhgvihhlsgesohifnhhmrghilhdrnhgvtheqnecuggftrfgrthhtvghrnhepge etfeegtddtvdeigfegueevfeelleelgfejueefueektdelieeikeevtdelveelnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepnhgvihhlsgesoh ifnhhmrghilhdrnhgvthdpnhgspghrtghpthhtohepvddvpdhmohguvgepshhmthhpohhu thdprhgtphhtthhopehvihhrohesiigvnhhivhdrlhhinhhugidrohhrghdruhhkpdhrtg hpthhtohepshgvlhhinhhugiesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthho pehlihhnuhigqdhunhhiohhnfhhssehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpth htoheplhhinhhugidqshgvtghurhhithihqdhmohguuhhlvgesvhhgvghrrdhkvghrnhgv lhdrohhrghdprhgtphhtthhopehlihhnuhigqdhnfhhssehvghgvrhdrkhgvrhhnvghlrd horhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghl rdhorhhgpdhrtghpthhtoheplhhinhhugidqfhhsuggvvhgvlhesvhhgvghrrdhkvghrnh gvlhdrohhrghdprhgtphhtthhopehmihhklhhoshesshiivghrvgguihdrhhhupdhrtghp thhtohepjhgrtghksehsuhhsvgdrtgii X-ME-Proxy: Feedback-ID: i9d664b8f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 22 Feb 2026 20:12:29 -0500 (EST) From: NeilBrown To: Christian Brauner , Alexander Viro , David Howells , Jan Kara , Chuck Lever , Jeff Layton , Miklos Szeredi , Amir Goldstein , John Johansen , Paul Moore , James Morris , "Serge E. Hallyn" , Stephen Smalley , "Darrick J. Wong" Cc: linux-kernel@vger.kernel.org, netfs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-unionfs@vger.kernel.org, apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org, selinux@vger.kernel.org Subject: [PATCH v2 00/15] Further centralising of directory locking for name ops. Date: Mon, 23 Feb 2026 12:06:15 +1100 Message-ID: <20260223011210.3853517-1-neilb@ownmail.net> X-Mailer: git-send-email 2.50.0.107.gf914562f5916.dirty Reply-To: NeilBrown Precedence: bulk X-Mailing-List: linux-security-module@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This is v2 of a series I sent shortly before the merge-window opened, and now that it has closed .... I have added: 01/15 to improve documentation as suggested by Darrick 11/15 as discussed with Amir to simplify the following patch various RB and AB (thanks Jeff in particular) I'm hoping this could land in vfs/ shortly (tihs month?). I will then have another series of patches which make a small start in changing the locking rules, which hopefully can also land in the next merge window. Original patch description below. Thanks, NeilBrown I am working towards changing the locking rules for name-operations: locking the name rather than the whole directory. The current part of this process is centralising all the locking so that it can be changed in one place. Recently "start_creating", "start_removing", "start_renaming" and related interaces were added which combine the locking and the lookup. At that time many callers were changed to use the new interfaces. However there are still an assortment of places out side of fs/namei.c where the directory is locked explictly, whether with inode_lock() or lock_rename() or similar. These were missed in the first pass for an assortment of uninteresting reasons. This series addresses the remaining places where explicit locking is used, and changes them to use the new interfaces, or otherwise removes the explicit locking. The biggest changes are in overlayfs. The other changes are quite simple, though maybe the cachefiles changes is the least simple of those. I'm running the --overlay tests in xfstests and nothing has popped yet. I'll continue with this and run some NFS tests too. Thanks for your review of these patches! NeilBrown [PATCH v2 01/15] VFS: note error returns is documentation for various [PATCH v2 02/15] fs/proc: Don't lock root inode when creating "self" [PATCH v2 03/15] VFS: move the start_dirop() kerndoc comment to [PATCH v2 04/15] libfs: change simple_done_creating() to use [PATCH v2 05/15] Apparmor: Use simple_start_creating() / [PATCH v2 06/15] selinux: Use simple_start_creating() / [PATCH v2 07/15] nfsd: switch purge_old() to use [PATCH v2 08/15] VFS: make lookup_one_qstr_excl() static. [PATCH v2 09/15] ovl: Simplify ovl_lookup_real_one() [PATCH v2 10/15] cachefiles: change cachefiles_bury_object to use [PATCH v2 11/15] ovl: pass name buffer to ovl_start_creating_temp() [PATCH v2 12/15] ovl: change ovl_create_real() to get a new lock when [PATCH v2 13/15] ovl: use is_subdir() for testing if one thing is a [PATCH v2 14/15] ovl: remove ovl_lock_rename_workdir() [PATCH v2 15/15] VFS: unexport lock_rename(), lock_rename_child(),