Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2096791pxb; Sun, 18 Apr 2021 18:48:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEp8cJW71qWaFw+3OKTrh5Aprr6M1wSfq/0PCUnK6C+U097clrRICx1fL9M1GBav/2rkor X-Received: by 2002:a17:90b:1e0d:: with SMTP id pg13mr3301487pjb.121.1618796923099; Sun, 18 Apr 2021 18:48:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618796923; cv=none; d=google.com; s=arc-20160816; b=0fKFyIWn8M1L4EFUoZhZpFLHcy50L53V0fXUxoj/imZr+NSwji7aUP2IPoklqSKyTx eIf33WnJpuCnPgTNWh2HEpjuKg1J9KcJDtSLwQK0iVz24o7c38r3Lh/hjtABdRajygvm DWk3qeAYil3YNoRrLcWvaZB1e1c6r+RXFy8rGwbuOr4kdHfpRPC6ze9bHL/TAO/6iY5T vXlzqoDDlchGhUJMVePfTxG0cex6rs8ibGZUULEfoPDrAJC31rgE1iHz/a2OTtGNYTdO RE5uPsOE0BqRqPu2sUjtlXMok6cDQ8mZNA477pM+bSR0K7V1u4bc4TCWjo97BQBamdPC /Ryw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:references:in-reply-to :subject:cc:date:to:from; bh=BbPUMt6lfUlKOqyF2oBbpxKdJr/iB2A4ofrOg46MBLs=; b=DeRXnMpMQ5mMPx2dDE/RK2LTeQowhohzlxo+VSleNwzPErzn6m3W7nel7YJE2KZdlq JhWuUGUGfifRgfcOYGMBGhLyhs01d0J6ZYEQXFLzfHxwr8b2PLPfjoG+lIyeDS46QOIr 7pMvLzZH5dvpidt48NoFGOHjnoCJPby0mazlR+rnFnigqg8lMZhbFfKPxMU/+NFvzKvY k0wcdwn/O97CAxlvJbi5pEjW5fhLBXsSbYfJd6BgJ7faJeUj0/4QUslVgJcEnIso/II8 T8MXnyWsHRwR4baXMC044lb7uhMGPXeFWh+zb0KK8PjTRFYDpgACrfm/yCG0IFulRGMM s/Dg== 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 g7si16036862pjs.23.2021.04.18.18.48.31; Sun, 18 Apr 2021 18:48:43 -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 S237102AbhDSBsL (ORCPT + 99 others); Sun, 18 Apr 2021 21:48:11 -0400 Received: from mx2.suse.de ([195.135.220.15]:58452 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232013AbhDSBsK (ORCPT ); Sun, 18 Apr 2021 21:48:10 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id ED7E8AEFF; Mon, 19 Apr 2021 01:47:40 +0000 (UTC) From: NeilBrown To: Fox Chen Date: Mon, 19 Apr 2021 11:47:34 +1000 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: Re: [PATCH v2 10/12] docs: path-lookup: update WALK_GET, WALK_PUT desc In-Reply-To: <20210316054727.25655-11-foxhlchen@gmail.com> References: <20210316054727.25655-1-foxhlchen@gmail.com> <20210316054727.25655-11-foxhlchen@gmail.com> Message-ID: <87sg3n11vt.fsf@notabene.neil.brown.name> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, Mar 16 2021, Fox Chen wrote: > WALK_GET is changed to WALK_TRAILING with a different meaning. > Here it should be WALK_NOFOLLOW. WALK_PUT dosn't exist, we have > WALK_MORE. > > WALK_PUT =3D=3D !WALK_MORE > > And there is not should_follow_link(). > > Related commits: > commit 8c4efe22e7c4 ("namei: invert the meaning of WALK_FOLLOW") > commit 1c4ff1a87e46 ("namei: invert WALK_PUT logics") > > Signed-off-by: Fox Chen > --- > Documentation/filesystems/path-lookup.rst | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > > diff --git a/Documentation/filesystems/path-lookup.rst b/Documentation/fi= lesystems/path-lookup.rst > index 0d41c61f7e4f..abd0153e2415 100644 > --- a/Documentation/filesystems/path-lookup.rst > +++ b/Documentation/filesystems/path-lookup.rst > @@ -1123,13 +1123,11 @@ stack in ``walk_component()`` immediately when th= e symlink is found; > old symlink as it walks that last component. So it is quite > convenient for ``walk_component()`` to release the old symlink and pop > the references just before pushing the reference information for the > -new symlink. It is guided in this by two flags; ``WALK_GET``, which > -gives it permission to follow a symlink if it finds one, and > -``WALK_PUT``, which tells it to release the current symlink after it has= been > -followed. ``WALK_PUT`` is tested first, leading to a call to > -``put_link()``. ``WALK_GET`` is tested subsequently (by > -``should_follow_link()``) leading to a call to ``pick_link()`` which sets > -up the stack frame. > +new symlink. It is guided in this by two flags; ``WALK_NOFOLLOW``, which There are 3 flags now. You haven't documented WALK_TRAIlING. > +suggests whether to follow a symlink if it finds one, and I don't think it is a suggestion. .. which forbits it from following a symlink if it finds one, and WALK_MORE which indicates that it is yet too early to release the current symlink. > +``WALK_MORE``, which tells whether to release the current symlink after = it has > +been followed. ``WALK_MORE`` is tested first, leading to a call to > +``put_link()``. I don't think that "tested first" sentence is relevant any more. Thanks, NeilBrown >=20=20 > Symlinks with no final component > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > --=20 > 2.30.2 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJCBAEBCAAsFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAmB84TYOHG5laWxiQHN1 c2UuZGUACgkQOeye3VZigblJwg//XFPq5YDJo4/GIPlHyRw7y6SO7XK2UjDJNeYG VE5dYZvQgwJw5p1G/GYvMDwCAv7wVpayYfyfC0pImwhz30MUzdmjG9obioi3L03g aCqlxCKG/4Q7Vnh02r/8ehc4uC+eGPlM2nZA/CbxVQWE0hLML6J6Qu/F4kyczxP/ 9fTuBGDtMl4rrqjdnc+erUCwEw9syFY039MCBshkc2rla/7UpevLiyHNcVnaz/tr RnuaauFCm6asyPjf8a3iOSmkk96byMHDTFlxZSeNsBpzUHLVducZYng01kG5q0zG f4snDhqb2TZzYWO11ykPIZbBDD+HW/6ZfgJSKFiMDO23v5RysZ3v0JNV46gU84Wm m+7TnvSTMg3OyOXmswHWJauwbC3LxySF+/ay78iah41PfKk3XQIAAJBafJyJPziV VVJKxK4EdIUmbG4BmQFEar7aP20iYhvd1UVY845/km/bJrQkjTx/JllqeAATur/p xpzc4ZcX/DgK+Wv6eZN/GNjiPyvei//wgmasuHdKC01tH0TZS0lAdQdCOFe+MdhP 7AVGsNT6EuSWNVDE4c9BawJvqMf3CETsUtKM9T3We2UtoQYRlaLiywziI84hpQmE tJzA20U5cHwGUdYWfF8fLKOpBoAaZaqcldI+u+Ge5XUSJpP801m3BDAlabVIqRKo upOEzWw= =B3Jb -----END PGP SIGNATURE----- --=-=-=--