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 X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50605C49EAF for ; Fri, 25 Jun 2021 18:00:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3598261929 for ; Fri, 25 Jun 2021 18:00:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230198AbhFYSCn (ORCPT ); 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?