Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1375363pxj; Sat, 8 May 2021 15:56:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCOtCVYzXa5320unPstoi4POCQwaPrOOWdfGOJzd6JIgxWVWLTorhh9/BWjOSumGiMcSHZ X-Received: by 2002:a02:3304:: with SMTP id c4mr15088943jae.68.1620514606851; Sat, 08 May 2021 15:56:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620514606; cv=none; d=google.com; s=arc-20160816; b=Gfvj4ZM0O1sOpsCAhJkFU53Py2fq48agz0rOX/YFXIDAXOnxZmNaabNfSqqNK/ZzJO S5QueGL+k41/LQgMzhVYb0t9U5zgSWTRLH30oCUAVdE+39R8wQtXRcpOq+MQY5fvfadJ Gt2/c2VCl0DbjW7SnuIaZAEjD5+N91esXMH0xrLEmrnnS3pTkJMNpvYiy/xPAGTMNv0W mPvijZYzneQo8LBsnx9rOdL0mSLwHDUVptmDfCXOpO9jMJUOrIGboWzPRgMFk/n0m9WA IhEtarPjQ8GRk8/xB+BQ2hYD/xWv4O+ZmnBJ69O0UseL7C9SlJ6efUbUCZs/avb6vxTP Sv+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=uU2C84LxLUzQFwZElgypUBzdpgy1KMmCT9LOJvhbML4=; b=NiI10azV+aWjFQRjxtIZsJEuVwPNYTNhXQD0VxtZgJl0SxPZpLvDQgVICSyetE3ewi hS8e/daM8mzPwuRpCqNNwvSXBKg1NI0Vqepl//vi+q02jRpoJG0SNiaHp2mEPxGqm2x4 4uTCfwBNTaM2O413ULx95SXzUbJP4q8/dr1NIcV2OrGhgXTCmtKnzizlv6HfmLlV552p bRfAriEKPqBuk1akg3xM+dfHp+zloCuSFXpFt5DYyb7vwhMEOS3qRgK8SFAglsVUAPkb 2E1aewDUjP1QT0Kab1a+QxdS1dDO+DOQZVu1956uw2jRj+VVQbdxiSpG4NmX97UAjGOo xEYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=RAYIrloA; 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 h5si12277945iol.44.2021.05.08.15.56.35; Sat, 08 May 2021 15:56:46 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b=RAYIrloA; 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 S229601AbhEHW5H (ORCPT + 99 others); Sat, 8 May 2021 18:57:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbhEHW5G (ORCPT ); Sat, 8 May 2021 18:57:06 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E98BC061574 for ; Sat, 8 May 2021 15:56:03 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id v5so3430680edc.8 for ; Sat, 08 May 2021 15:56:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uU2C84LxLUzQFwZElgypUBzdpgy1KMmCT9LOJvhbML4=; b=RAYIrloAyTI0escC4FJrZEqff58mGNKpKYKPCWyfaq6tPSVX7E0HvbEpZICexuWOJl cTb8VTtrxxvNrokrOEsTOilRR8r0Du+gtbA27yAia0bgOluq1xb1ES21ZBT6x5owDQfQ d+VnnukbT/eYVV1K8DnY34CmcMlPrprr6+vgE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uU2C84LxLUzQFwZElgypUBzdpgy1KMmCT9LOJvhbML4=; b=bRG4PxU5H2T1/JyZTM1F3ti70TuI9jV00r+vviPPZbpWyRtXOLBNgmI0Sm6NNSwztN Cgr243F+PBnIWGsF2kTZjLHo2+KUTcFrraWUhh3HAoSad4AXJM/Q/eGFvhZo0Nf8LuTC g8fa7ERlq1f25eGbkc57HHvW/SnXogKmQDnqCzkBknQy7WSITQsfMjXr9Lw+IUNGvdVR Q1yduMUxnsXRJzdaYcNgfnCjZhE3dK3hjARl5e8nbfE/xBhc5498X71TTbv32PlRxS12 +iEt0ChCK+lzakzaI+xwTYcYkQHuq71aLwtJ914Rx5achrPKO44GAm1BGO5BMVAv6gkr gAFg== X-Gm-Message-State: AOAM5307wxsICVst6RK5xeOfN+Kwh9xmDOhXoORXMeNIy0QgbNZC4GK+ XcFQv+AI4gE7l5Kvs2do0e7yZlVtpvik6qaIlDg= X-Received: by 2002:a05:6402:1d8f:: with SMTP id dk15mr17589674edb.146.1620514562138; Sat, 08 May 2021 15:56:02 -0700 (PDT) Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com. [209.85.208.48]) by smtp.gmail.com with ESMTPSA id 16sm5973509ejw.0.2021.05.08.15.56.02 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 08 May 2021 15:56:02 -0700 (PDT) Received: by mail-ed1-f48.google.com with SMTP id v5so3430670edc.8 for ; Sat, 08 May 2021 15:56:02 -0700 (PDT) X-Received: by 2002:a05:6512:1095:: with SMTP id j21mr10765354lfg.40.1620514074003; Sat, 08 May 2021 15:47:54 -0700 (PDT) MIME-Version: 1.0 References: <20210508122530.1971-1-justin.he@arm.com> <20210508122530.1971-2-justin.he@arm.com> In-Reply-To: From: Linus Torvalds Date: Sat, 8 May 2021 15:47:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH RFC 1/3] fs: introduce helper d_path_fast() To: Al Viro Cc: Jia He , Petr Mladek , Steven Rostedt , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Jonathan Corbet , Al Viro , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 8, 2021 at 3:42 PM Linus Torvalds wrote: > > But your READ_ONCE() is definitely the right thing to do (whether we > do your re-org or not, and whether we do this "prepend_buffer" thing > or not). Oh, and looking at it some more, I think it would probably be a good thing to make __dentry_path() take a struct prepend_buffer *orig argument, the same way prepend_path() does. Also, like prepend_path(), the terminating NUL should probably be done by the caller. Doing those two changes would simplify the hackery we now have in "dentry_path()" due to the "//deleted" games. The whole "restore '/' that was overwritten by the NUL added by __dentry_path() is unbelievably ugly. Linus