From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EDC0EC433EF for ; Wed, 29 Sep 2021 22:51:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C5C0E61439 for ; Wed, 29 Sep 2021 22:51:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345032AbhI2Wwq (ORCPT ); Wed, 29 Sep 2021 18:52:46 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:39731 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346417AbhI2Wwp (ORCPT ); Wed, 29 Sep 2021 18:52:45 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 7DC5D5C00ED; Wed, 29 Sep 2021 18:51:03 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 29 Sep 2021 18:51:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=themaw.net; h= message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; s=fm1; bh= /SmpU8+zuhfCdM1F4tBy43UJVJESbBMrVSDv8V0+hsM=; b=ZooT6Wo17uDeqWhA JzZvdNwHGFCwnBtwMSFoHQWa2+ibDLx3MgQIvebs8DLPyHa98ts1xdA6WrJF7LtJ oPKuFdO+OkBUKk10+uVAq9ocUpFZx9dfONzK0ndhLrRyOJaipCUbrlpU3RzGvrDi kYJDesiqb4eGfB4KfCHTpoztPUqB9OVNis+dEaGUU8vJWVpMtT5ciB7ZwJZHnvpI GWNFRfxE9izpSRLRKAi8Jqshevhoiq1BS7g1u1PEw0b4LjWoo5FrJfsaRfyV9jSr SLYPpLBNz6jjt7egqhZo28GA2iX1d0Rx12VANvrCKC5iZJQFhUiDH0tf+l+toEdS j+eoiA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=/SmpU8+zuhfCdM1F4tBy43UJVJESbBMrVSDv8V0+h sM=; b=K1rX6rFqOT4VP4yUORHS9r9Ohu15BQWLde3fiLqJnCQWCgncTNcv5Q7OF lVN5ZpujXdBtWjWLqTafjaDWDgNzOTTxiJsIsBtAVoKmtLXGRASvUuBOLMFAkZCb 0FM9L3PyWqGDa/efrYCY0iETk6ivr1jWZS1mceSN2Z5kckpAi6FaeMIgtbfOH9dz 9h+/4bJ7oAVj+NqxSXczIO7pSttZQvqXpqeTwPHtSRe8M4cUC7JlAfKaI8ZgqW7f 8++zX4gHR/alP1SHUn/v+PAH2vgVm4Lu0xW8rnj73yBr3Lmh4CFMWa3BMzqwWyOu DvsGCeZLgoRvX8tcGxMRGo/ANwXiQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekfedgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkffuhffvffgjfhgtfggggfesthekredttderjeenucfhrhhomhepkfgrnhcu mfgvnhhtuceorhgrvhgvnhesthhhvghmrgifrdhnvghtqeenucggtffrrghtthgvrhhnpe fgleelkeetheelgeehueejueduhfeufffgleehgfevtdehhffhhffhtddugfefheenucev lhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehrrghvvghnse hthhgvmhgrfidrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 29 Sep 2021 18:50:59 -0400 (EDT) Message-ID: <32c970d1f93a02207cb1746852e51bae4b2691c8.camel@themaw.net> Subject: Re: [PATCH] kernfs: don't create a negative dentry if inactive node exists From: Ian Kent To: Greg Kroah-Hartman Cc: Tejun Heo , Hou Tao , David Howells , Miklos Szeredi , Rick Lindsley , Al Viro , Carlos Maiolino , linux-fsdevel , Kernel Mailing List Date: Thu, 30 Sep 2021 06:50:56 +0800 In-Reply-To: References: <163288467430.30015.16308604689059471602.stgit@mickey.themaw.net> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, 2021-09-30 at 06:28 +0800, Ian Kent wrote: > On Wed, 2021-09-29 at 08:05 +0200, Greg Kroah-Hartman wrote: > > On Wed, Sep 29, 2021 at 11:04:34AM +0800, Ian Kent wrote: > > > In kernfs_iop_lookup() a negative dentry is created if there's no > > > kernfs > > > node associated with the dentry or the node is inactive. > > > > > > But inactive kernfs nodes are meant to be invisible to the VFS > > > and > > > creating a negative dentry for these can have unexpected side > > > effects > > > when the node transitions to an active state. > > > > > > The point of creating negative dentries is to avoid the expensive > > > alloc/free cycle that occurs if there are frequent lookups for > > > kernfs > > > attributes that don't exist. So kernfs nodes that are not yet > > > active > > > should not result in a negative dentry being created so when they > > > transition to an active state VFS lookups can create an > > > associated > > > dentry is a natural way. > > > > > > Signed-off-by: Ian Kent > > > --- > > >  fs/kernfs/dir.c |    9 ++++++++- > > >  1 file changed, 8 insertions(+), 1 deletion(-) > > > > Does this fix a specific commit and need a "Fixes:" tag? > > Oh, of course yes, apologies, my bad. > I re-post it. But in case your ok to add it on my behalf it should be: Fixes: c7e7c04274b1 ("kernfs: use VFS negative dentry caching") > > > Ian