Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1023947pxj; Fri, 11 Jun 2021 18:58:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6nR+idVp8qmoj0T1posgqothVltGMnSuxFbRcC2cy5Kh7bxENhUrg35oulua2++unnghT X-Received: by 2002:a17:906:6d97:: with SMTP id h23mr5918888ejt.467.1623463089300; Fri, 11 Jun 2021 18:58:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623463089; cv=none; d=google.com; s=arc-20160816; b=znJxfiqlp8Hlw7ey8qpI2+ygIT1Eq8uK0kewPzyn0MjBemIIXQqm8BPVlkcIT5aqD1 DBg05wDJelUafVAjWAGwrClVGu99BcY2/xUzpri3qIYhTlE6QsdxyAmKI+Q0DkUGH7Ve t0RKLhnl18DRaiD5VEHNZ0UknXc+i/NUv8kstW1TDBShUZ02iFckVjkrvRmoJwE+n4vG i3Ss/cXsEvoXKmLemlalFMxJIOW2PPl439X5PMvr39GKdTMcZ3j0xOsysfkaIIfllJlq KcsQOGGttRCXw+9txRG4V4BaY/Vf0z2XZn7JpEN9kovXh34h5Gs2QuLq/wB2F/f7IFdZ 7RQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=YlPxy2Xdm89u5fKJFtRQOG/1OR9BDAt43Jf+VVu8TEI=; b=e/7bbEW93rHPTX7F9HTbtTjaVvmLfC4LD/Vd0pS6WBtrtCXB0jTiz5k9/RYCEp/mBq Tntcuc91WIHr9siyzAY3iFVrSatnRlFq1sbCtlqDoUCLLQY1bWmrHuo5fCMNqsUfixXg fK4/5sgOd3REdQv9lI0nzN7JlnF1ZQnEKcNGWFWEPwv3HVNGrqRGQc4RIeYPcF6FIuO8 1guR73efkCs5K0OLItvu/TprGrzd23x89FG+bRiLayFFm2QD5I9P80vuz4LP2w7IT4n+ vbSL71qKw23UhVwCQa3dNvhd+VxUkkj2eY99pegdMnWc1MULaH1YRftIM++1xk32iPhC B8Lg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bi15si7183694edb.459.2021.06.11.18.57.46; Fri, 11 Jun 2021 18:58:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230385AbhFLByN (ORCPT + 99 others); Fri, 11 Jun 2021 21:54:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229622AbhFLByN (ORCPT ); Fri, 11 Jun 2021 21:54:13 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7B38C061574; Fri, 11 Jun 2021 18:52:14 -0700 (PDT) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lrsoM-007AAA-Sv; Sat, 12 Jun 2021 01:51:46 +0000 Date: Sat, 12 Jun 2021 01:51:46 +0000 From: Al Viro To: Ian Kent Cc: Greg Kroah-Hartman , Tejun Heo , Eric Sandeen , Fox Chen , Brice Goglin , Rick Lindsley , David Howells , Miklos Szeredi , Marcelo Tosatti , "Eric W. Biederman" , Carlos Maiolino , linux-fsdevel , Kernel Mailing List Subject: Re: [PATCH v6 3/7] kernfs: use VFS negative dentry caching Message-ID: References: <162322846765.361452.17051755721944717990.stgit@web.messagingengine.com> <162322862726.361452.10114120072438540655.stgit@web.messagingengine.com> <2ee74cbed729d66a38a5c7de9c4608d02fb89f26.camel@themaw.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Jun 12, 2021 at 09:08:05AM +0800, Ian Kent wrote: > But if I change to take the read lock to ensure there's no operation > in progress for the revision check I would need the dget_parent(), yes? WTF for? ->d_parent can change *ONLY* when ->d_lock is held on all dentries involved (including old and new parents). And it very definitely does *not* change for negative dentries. I mean, look at the very beginning of __d_move().