Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp652902pxj; Thu, 27 May 2021 08:40:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwo3ZZKVo5XTuknjsBlJJRtmo2acZFfGE2wq+dJnCo/vwFZMLBe0qX0BIWoPTsTEWNip88h X-Received: by 2002:a5e:9602:: with SMTP id a2mr3370373ioq.146.1622130038103; Thu, 27 May 2021 08:40:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622130038; cv=none; d=google.com; s=arc-20160816; b=Qn/vYhtmCIH2qbRRUw8rPMwVnrRWAcQ3k/7HLmHy8R5nZW48IzhGdjZdavihWqacdI 8VRy9fZj0OWHBEKOxm6VLBkqnOnKswja+2GY3LCsX/5SBlziS7fanRVu6kPkNjlKL8A5 egq1DpY2jqwfGccMHGIEO3dB/F4LOuw3HOcjOfslcavdydtydJ3xzSs76bkMSBVA4jCE o4/zhLahbU2C5ZQMx2+yWG3GaMo/bJTMSIAv7wCIG005TbCwyLw+V0cqu3gpXpYNhecR E6M2A5BxLmk+shfbm5ayqo9HQvp9bF7tJhJMRg3NiSOaOCpdza+7uA1FgWiZnQRX4osB h0/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=1BMErcT3/v1nq01VnwMgx0Uydy0/71XuGDRPJXuVrAo=; b=ZanWdxPoksaF4gF3Nacxql1VNQDLkhFiyTTAfbd6hcFSAruTaOyVJwISmsIPOhxJRc 1HaNso7sQzDwxwi6dgjNSEEmRU7NYK4/o8EtnpNxFp3SvvYuB//7CpzhrLg8pB1DZgB5 tGLHW7yrorUcON7kAwxO09zj1ygW7Xn1fwB3xhyrDbNnP7c8CoymI2PXyivqkAjZpO/b 7uBVVjkGks3vLAmSz80sjKeFQwrtyLTDwQ4Sa4ILQM5izv5McC5pZCejGjQ1yDPQxlEz 6YfG38WwaRAMIpKQxm62my9TAAyMuc+a38CX2WEbQ3ye1XPAIM2EaKXnvGznupoBkSs7 sOLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Sj8mWO1Z; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w8si2468689iou.72.2021.05.27.08.40.24; Thu, 27 May 2021 08:40:38 -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=@gmail.com header.s=20161025 header.b=Sj8mWO1Z; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235781AbhE0JSb (ORCPT + 99 others); Thu, 27 May 2021 05:18:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235773AbhE0JS3 (ORCPT ); Thu, 27 May 2021 05:18:29 -0400 Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14A3EC061574; Thu, 27 May 2021 02:16:56 -0700 (PDT) Received: by mail-pf1-x42c.google.com with SMTP id q25so123390pfn.1; Thu, 27 May 2021 02:16:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1BMErcT3/v1nq01VnwMgx0Uydy0/71XuGDRPJXuVrAo=; b=Sj8mWO1ZU5OR/lQCX8ihGfd8pi4a8ZWcnWJlU5gMAkJ49kHw+BSJrc30I3Bng9RQep ++6/aFlfNg0wVGMnBF0pPF0FPKr0xt5KW74/wJbnmAvrGnmdeOr9TG2rWO55OEuORXhw NTrryTBMWu5Y15U2iWwxnvsBspbBA3Z/82oeMUgahMz6jb6RCl8GSm1T7RkdfOZ+6zG4 2xU4g80MwNEwWxnjXdBg4OCq8B/OJ8ZFqr3mc3AJlqU6Hdlw3PYkKQgyZh6vwt6jT++3 QA0TPmu+h8HdLscLSRyuIYT7VrTJM2y0sF7ZpS+u0wJOKeWsnqDprafwGRYTrCLP9av5 grtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1BMErcT3/v1nq01VnwMgx0Uydy0/71XuGDRPJXuVrAo=; b=jBKj0EHf94i4rjTEoVL/362shsLmn4wNxXPkMkN58IInsL3hNs8P0qUtEeWdFwTODA ctEnu0KGvHTg5nzMaVvfwPDDXxlYV12by4HpAp0ZmdQm8vUf+wit0wWAtKMUm2LIddYW Znjfu4H0ZyU1lBHMKU1RxcvOLsBxjkee5MS5Qwp1mB/2xgs9xdmhISQUQRL/YYgpONPl 9Fp9Rhy9KlJgXp1SXjdaaByrbRIiooWBcQO23L5GZNJJO3XOHN+yOzFDWswjg0uoa64Q VZxghNKJ0Bx66qqwVmKsgkdTR4IjGqDj/wcjNcqYU/W0G3JYbEOoGnhVYKl3rX6wYRUd 7fPw== X-Gm-Message-State: AOAM533+NgekQwVtzsTdv0ux7+E9vVyKffHZNAoITNTRPk63G8eRVuQq F9jY8X3G7GzNCHWf1Y7sWi8= X-Received: by 2002:aa7:9001:0:b029:2d4:9408:9998 with SMTP id m1-20020aa790010000b02902d494089998mr2805504pfo.9.1622107015606; Thu, 27 May 2021 02:16:55 -0700 (PDT) Received: from cl-arch-kdev.. (cl-arch-kdev.xen.prgmr.com. [2605:2700:0:2:a800:ff:fed6:fc0d]) by smtp.gmail.com with ESMTPSA id 126sm1473079pfv.82.2021.05.27.02.16.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 May 2021 02:16:55 -0700 (PDT) From: Fox Chen To: neilb@suse.de Cc: Fox Chen , corbet@lwn.net, vegard.nossum@oracle.com, viro@zeniv.linux.org.uk, rdunlap@infradead.org, grandmaster@al2klimov.de, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org Subject: [PATCH v3 02/13] docs: path-lookup: update path_to_nameidata() part Date: Thu, 27 May 2021 17:16:07 +0800 Message-Id: <20210527091618.287093-3-foxhlchen@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210527091618.287093-1-foxhlchen@gmail.com> References: <20210527091618.287093-1-foxhlchen@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No path_to_namei() anymore, step_into() will be called. Related commit: commit c99687a03a78 ("fold path_to_nameidata() into its only remaining caller") Signed-off-by: Fox Chen --- Documentation/filesystems/path-lookup.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Documentation/filesystems/path-lookup.rst b/Documentation/filesystems/path-lookup.rst index 751082d469e8..6ea0880fb982 100644 --- a/Documentation/filesystems/path-lookup.rst +++ b/Documentation/filesystems/path-lookup.rst @@ -453,11 +453,12 @@ to find a definitive answer. As the last step of ``walk_component()``, ``step_into()`` will be called either directly from walk_component() or from handle_dots(). It calls ``handle_mounts()``, to check and handle mount points, in which a new -``struct path`` containing a counted reference to the new dentry and a -reference to the new ``vfsmount`` which is only counted if it is -different from the previous ``vfsmount``. It then calls -``path_to_nameidata()`` to install the new ``struct path`` in the -``struct nameidata`` and drop the unneeded references. +``struct path`` is created containing a counted reference to the new dentry and +a reference to the new ``vfsmount`` which is only counted if it is +different from the previous ``vfsmount``. Then if there is +a symbolic link, ``step_into()`` calls ``pick_link()`` to deal with it, +otherwise it installs the new ``struct path`` in the ``struct nameidata``, and +drops the unneeded references. This "hand-over-hand" sequencing of getting a reference to the new dentry before dropping the reference to the previous dentry may -- 2.31.1