Received: from fhigh-b7-smtp.messagingengine.com (fhigh-b7-smtp.messagingengine.com [202.12.124.158]) (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 12C36345CCD for ; Wed, 1 Jul 2026 23:31:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.158 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782948708; cv=none; b=N8aDhJV2Tr1bsZGTyepPnSLTrkAMCkuDOTOPIRQQjvz0iYbhKbEeR+Hbt75ulTS7pyhPmGCO6S1JP8KDRMyjZJvYt+6fYvgtB0azHMpYniSyoD8yqEHptreB44gdhVklqsHGg20KcfAX0UjBarQtJ6jcPJlIgb1dNC1Q4ueWr1o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782948708; c=relaxed/simple; bh=SXHdQY+wsd6NtR0c9O8gL4IyIkluAex6RJYOc4Zzy44=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OeZCBk6BGQUG8ZAANVHttPAdnvic1ixEe4+T3/WXIFuI5mv8WVrfZHgBjVbzRYAXrM3f+O1PubRJKwM/WukqSdqSbJMXqw+bYqe8Y5IlYCZTlng1U1zBQ4RAsubtBz8AYukRuC9URe84nYaahe1z8xIPXRPweJ8oZP6GHRYfXTw= 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=W3HuyTAL; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=KicvaLiz; arc=none smtp.client-ip=202.12.124.158 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="W3HuyTAL"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="KicvaLiz" Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfhigh.stl.internal (Postfix) with ESMTP id 45E0A7A0105; Wed, 1 Jul 2026 19:31:46 -0400 (EDT) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-12.internal (MEProxy); Wed, 01 Jul 2026 19:31:46 -0400 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=fm1; t=1782948706; x=1783035106; bh=/e9i+ev0uy Q/unglBKSC6+PiYJ8NeoGwMi3DsBu/1dA=; b=W3HuyTALT4BtjqJmqa/Og5WYLS qFpwiGkRZ4bHCaV4/HLHD2eqvZ8EHOWJ9WnPxlk8wvPzmR0ZVOn8tzTbUXVcRFGa B2uABVFP/geIdsBs5xGhtCfTUZh7wn+/LCv7LKr9W/L73JkLjfI98TNRQX3NCzKF +ORSjIaiGsOToZh2WXnAF1yw1e1O5F3Ou/YLBnMZ5lw1i026OLOmd+8f2filSK1O pjoHVI3G7g8U10ADGDk6KyF/HGNFr0rD7mMVMJkNq46Ts+AGznHhwsmZk4Mlg7d4 MEVFn50dbH9HnB4lK2tQerUj2EOigFyZd3oS5opEt/ozvOmTgGJxcJssxHhg== 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= fm1; t=1782948706; x=1783035106; bh=/e9i+ev0uyQ/unglBKSC6+PiYJ8N eoGwMi3D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Dx7EYXc6hMGhPA X-ME-Proxy: Feedback-ID: i9d664b8f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Jul 2026 19:31:44 -0400 (EDT) From: NeilBrown To: Alexander Viro , Christian Brauner Cc: Jan Kara , linux-fsdevel@vger.kernel.org Subject: VFS: prepare for changes to directory locking Date: Thu, 2 Jul 2026 09:29:00 +1000 Message-ID: <20260701233128.3356519-1-neilb@ownmail.net> X-Mailer: git-send-email 2.50.0.107.gf914562f5916.dirty Reply-To: NeilBrown Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit These patches are part of some prep work to allow changes to directory locking. The short term goal is to invert the locking order between d_alloc_parallel() and inode_lock() so that d_alloc_parallel() can (only) be called without holding inode_lock(). This particularly requires filesystems not to use d_drop() in the middle of an operation, which particularly requires the d_splice_alias() change. As it will require d_alloc_parallel() to NOT be called under the inode lock, d_alloc_trylock() is added which CAN be used when failure is safe (dcache priming in readdir). I have other related patches which make changes to lookup_open() and related code but I think it best to wait for the O_CREAT|O_DIRECTORY patches to land first (unless it is decided that they won't land). If these patches can land in a stable branch, I can start making changes to various filesystems which depend on these. Thanks, NeilBrown [PATCH 1/4] VFS: fix various typos in documentation for [PATCH 2/4] VFS: enhance d_splice_alias() to handle in-lookup [PATCH 3/4] VFS: introduce d_alloc_trylock() [PATCH 4/4] VFS: add d_duplicate()