From patchwork Fri Nov 24 06:06:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 13467030 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linux.org.uk header.i=@linux.org.uk header.b="Qbbyk1uo" Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34A4919B1; Thu, 23 Nov 2023 22:06:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=QOwAEHjAzooiTixlURPQlI4OYbvcu2xupAv3xF9Peuk=; b=Qbbyk1uo2Pul/QQ1Qx/TFF3EfR 7krygJOlZpmSQq8mZh40soaNMQbHRHXR62k5ylGUMpL27wtLvO1qPtmHVAA/VzGBuni2HEv8oJiTD FqF0yDTLw1avpKGI7iR65+13M+pBmM6+5euuvpYO5GN0NPrGko4u8yUAScivLnnt6GIxoUkClTRYu nwy6AzVbaHDe/o1I21EZg06g/ljqQIwt76wO06cMXDpXJQ71qxdlp+RpJe7nehyF/kAiUN4XGKylj MhGcqz+UinMeMCNVnFt89VbWqgtwvbhc/AVesV8zDm5Fx+tqiF/QPVLFUd8NIoQks43MCMzr1xn5r cqORuJnQ==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.96 #2 (Red Hat Linux)) id 1r6PKx-002Q1k-21; Fri, 24 Nov 2023 06:06:47 +0000 From: Al Viro To: linux-fsdevel@vger.kernel.org Cc: Linus Torvalds , Christian Brauner , linux-kernel@vger.kernel.org Subject: [PATCH 17/20] d_alloc_parallel(): in-lookup hash insertion doesn't need an RCU variant Date: Fri, 24 Nov 2023 06:06:41 +0000 Message-Id: <20231124060644.576611-17-viro@zeniv.linux.org.uk> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231124060644.576611-1-viro@zeniv.linux.org.uk> References: <20231124060553.GA575483@ZenIV> <20231124060644.576611-1-viro@zeniv.linux.org.uk> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Sender: Al Viro We only search in the damn thing under hlist_bl_lock(); RCU variant of insertion was, IIRC, pretty much cargo-culted - mea culpa... Signed-off-by: Al Viro --- fs/dcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dcache.c b/fs/dcache.c index 440b46851f52..51e2f777a2c5 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -2690,7 +2690,7 @@ struct dentry *d_alloc_parallel(struct dentry *parent, /* we can't take ->d_lock here; it's OK, though. */ new->d_flags |= DCACHE_PAR_LOOKUP; new->d_wait = wq; - hlist_bl_add_head_rcu(&new->d_u.d_in_lookup_hash, b); + hlist_bl_add_head(&new->d_u.d_in_lookup_hash, b); hlist_bl_unlock(b); return new; mismatch: