Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1359067pxv; Fri, 25 Jun 2021 11:01:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgVsrodoPEXPEao/B1/cdTes4sJMuNHrCa6aMEltD7pUo/locP+xVoV+AT7Poqv9/4t83H X-Received: by 2002:a92:cdaf:: with SMTP id g15mr8418747ild.272.1624644066216; Fri, 25 Jun 2021 11:01:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624644066; cv=none; d=google.com; s=arc-20160816; b=PMhQuTf+CPqs4G9bgJQx/LKFN5prca4qWGUHv27axRxA4key7eCxZeRyTp7gwUeJC3 nlv8mDqrBSHSakUytbjIouGZCoNv0iR8DZ1Mv4mTojwHszuXQ0R/K4oVQH1Fu1Vm3Zzp 3PaSPvmtfu37NDl95BsW4z3Q82TfwlfFiICwHDFBlTn4nJnEytyMNXpjO6+doR0Q9AUu ZaHkPKnkzznsCLqVyyay52IhJwk2SmS9O9pyc5pnKzJVsvOJofMb5kI3L+hZRR4Bl3z0 YWL2e+CDnSgCmQHntN/9/Hd2tTf1+8pIpUellqI7tYiMR+II449AGD3ZngabOrP9QyCa Sk1Q== 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=Zo43QXgOzEBcLr6B3yj8qp6tK15kPvPZ2VXNM7jUk/k=; b=gh1k3+C0RU8aVs0iAIcGfth2NyQupivD2hcnlv13Ci1C214zJwHwjU7HAblbkL7Pkt lc8EHosFXdPvCSW3fkLYmc3B2P993oNDRqLX038fkHgz4NAjb63QzKwodIIxCW84Rh7V atnN1rM4xkuftVaNYECQg4orcr0Z7QzEPY7z9e3YFjY4OlBvQrnNtFBWUdW2MH8ZMWuD lJoVlVDIqIu7y7bSDAbLnInDPCg94qTaXgIEwSeUyO7ULOXH1j1fcDrNKj2l/e+EMG9u GfQeAkyGGdMoHX3nkoTP41h7z9b1t99Sb3kvDX7HHof6onBycDIranzYzWrBDsKcoUfm LSUg== 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 z15si7461058ill.117.2021.06.25.11.00.54; Fri, 25 Jun 2021 11:01:06 -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 S230123AbhFYSCn (ORCPT + 99 others); Fri, 25 Jun 2021 14:02:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbhFYSCl (ORCPT ); Fri, 25 Jun 2021 14:02:41 -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 D2EE4C061574; Fri, 25 Jun 2021 11:00:20 -0700 (PDT) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1lwq69-00CB0n-0a; Fri, 25 Jun 2021 17:58:37 +0000 Date: Fri, 25 Jun 2021 17:58:36 +0000 From: Al Viro To: Justin He Cc: Linus Torvalds , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Jonathan Corbet , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , "Eric W . Biederman" , "Darrick J. Wong" , "Peter Zijlstra (Intel)" , Ira Weiny , Eric Biggers , "Ahmed S. Darwish" , "open list:DOCUMENTATION" , Linux Kernel Mailing List , linux-s390 , linux-fsdevel Subject: Re: [PATCH 13/14] d_path: prepend_path() is unlikely to return non-zero Message-ID: References: <20210519004901.3829541-1-viro@zeniv.linux.org.uk> <20210519004901.3829541-13-viro@zeniv.linux.org.uk> 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 Fri, Jun 25, 2021 at 08:00:49AM +0000, Justin He wrote: > --- a/fs/d_path.c > +++ b/fs/d_path.c > @@ -210,6 +210,7 @@ static int prepend_path(const struct path *path, > b = *p; > read_seqbegin_or_lock(&rename_lock, &seq); > error = __prepend_path(path->dentry, real_mount(path->mnt), root, &b); > + printk("prepend=%d",error); > if (!(seq & 1)) > rcu_read_unlock(); > if (need_seqretry(&rename_lock, seq)) { > > Then the result seems a little different: > root@entos-ampere-02:~# dmesg |grep prepend=1 |wc -l > 7417 > root@entos-ampere-02:~# dmesg |grep prepend=0 |wc -l > 772 > > The kernel is 5.13.0-rc2+ + this series + my '%pD' series > > Any thoughts? On which loads? 1 here is "mount/dentry pair is in somebody else's namespace or outside of the subtree we are chrooted into". IOW, what's calling d_path() on your setup?