Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp710581pxb; Wed, 27 Jan 2021 20:15:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzupNEac8uGx2JPj9yuk5KZtFxX1XdVOyTgU5nL4oBPFTDP/5tD2/rUdfXbMlQe4onczz1f X-Received: by 2002:a05:6402:3509:: with SMTP id b9mr9466419edd.250.1611807353125; Wed, 27 Jan 2021 20:15:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611807353; cv=none; d=google.com; s=arc-20160816; b=qh0shXUtJY9+jjZSbBAenDa6ZErJigPayk+JWTmFWDuBojuz4U2KpF9VXdpGY7eqID oxpt/BKt5BYhpJ9w8e0i9Hctl42A1jQyrtRrSKvIy2al8DUJcFsMa2Vf4SLw01q9sXAN Wg1wz5vE8he57fNxj63WWQYMTpwK+vFxN1HDgG/E0lScTmA/fICBC/BQTtLSWNIj5xS1 UYyT28pYgveKjnuCxsWCtznnqlLaIIlAFrsTauNF6ohuAiyoIz8CX64RLcT7RYek5ukN KJ7Vkl5LSu32xQ88LPNxCflBlBhi9cG8MW719OJT2cvcJLf5yErtbNXSfGL8O7QZ5Zry zPOA== 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=IJaf9fhLibD6GBHrGBl7V47R5TKDbvKm/jD5Rt+SwyA=; b=A4KkVOONvA9CWS8Rz0RPY47X5DrT5CO7vDxaC3x5yvWpBN2zlgMDUl4ru5JuCAKs2k EGK227shGsxiA+FaTD1VMTT/RepX1EzYqtWG0bAxQIXeNl71ryeNiFSDeY+yQfvJyc3Q VstVOoT69r/htJa7DlhBNe+s9y2XBy1ZbjH69qnR++/+Plj2zGjeh5NeGwwGLyd+dI2q lIzlzA+uhJh2vhUO17kTXK/PeKiL5+I/flnlJOXQvRx1RLkoP8CYs74cvSf2lMsgbk4K nsVNig/HB6iO76v5kJFBxKcWGLX7LV7H+YVd3mHNLeN7fHh4oomp+2g/E5Rawtps9Qvw SioA== 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 u16si1783957ejb.649.2021.01.27.20.15.28; Wed, 27 Jan 2021 20:15:53 -0800 (PST) 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 S231261AbhA1EO1 (ORCPT + 99 others); Wed, 27 Jan 2021 23:14:27 -0500 Received: from mx2.suse.de ([195.135.220.15]:60148 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbhA1EOR (ORCPT ); Wed, 27 Jan 2021 23:14:17 -0500 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 73B49ABDA; Thu, 28 Jan 2021 03:53:46 +0000 (UTC) From: NeilBrown To: Fox Chen , corbet@lwn.net, vegard.nossum@oracle.com, viro@zeniv.linux.org.uk, rdunlap@infradead.org, grandmaster@al2klimov.de Date: Thu, 28 Jan 2021 14:53:40 +1100 Cc: Fox Chen , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 07/12] docs: path-lookup: i_op->follow_link replaced with i_op->get_link In-Reply-To: <20210126072443.33066-8-foxhlchen@gmail.com> References: <20210126072443.33066-1-foxhlchen@gmail.com> <20210126072443.33066-8-foxhlchen@gmail.com> Message-ID: <8735ylhg3f.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, Jan 26 2021, Fox Chen wrote: > follow_link has been replaced by get_link() which can be > called in RCU mode. > > see commit: 6b2553918d8b4e6de9853fd6315bec7271a2e592 > > 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 25d2a5a59f45..0a362849b26f 100644 > --- a/Documentation/filesystems/path-lookup.rst > +++ b/Documentation/filesystems/path-lookup.rst > @@ -1062,13 +1062,11 @@ filesystem cannot successfully get a reference in= RCU-walk mode, it > must return ``-ECHILD`` and ``unlazy_walk()`` will be called to return to > REF-walk mode in which the filesystem is allowed to sleep. >=20=20 > -The place for all this to happen is the ``i_op->follow_link()`` inode > -method. In the present mainline code this is never actually called in > -RCU-walk mode as the rewrite is not quite complete. It is likely that > -in a future release this method will be passed an ``inode`` pointer when > -called in RCU-walk mode so it both (1) knows to be careful, and (2) has = the > -validated pointer. Much like the ``i_op->permission()`` method we > -looked at previously, ``->follow_link()`` would need to be careful that > +The place for all this to happen is the ``i_op->get_link()`` inode > +method. This is called both in RCU-walk and REF-walk. In RCU-walk the > +``dentry*`` argument is NULL, ``->get_link()`` can return -ECHILD to drop > +RCU-walk. Much like the ``i_op->permission()`` method we The phrase "drop RCU-walk" isn't consistent with the rest of the text. It talks about "dropping down to REF-walk", so you could write "dropping out of RCU-walk", but not just "dropping RCU-walk". NeilBrown > +looked at previously, ``->get_link()`` would need to be careful that > all the data structures it references are safe to be accessed while > holding no counted reference, only the RCU lock. Though getting a > reference with ``->follow_link()`` is not yet done in RCU-walk mode, the > --=20 > 2.30.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJCBAEBCAAsFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAmASNUQOHG5laWxiQHN1 c2UuZGUACgkQOeye3VZigbmZRQ//XLYLM06bPmySmfV+5mnL2d0l4e+4B7qRfJ7a 4Bj3/wPxQxNXCP2Ie2t4Y/sxyQS2/kDRiTN+RUd86rV4RYDrJC3ZKP51GhQK+DIy dHsYONxHCVlKMRBpkkD2KKungJcKTGPVCCIrs9s8AgStFgDAUyc5z0Wr5ucffCV9 QjF1DQg97nCMAbhzH1DUO9QG6LMKdVcG2b9g4ujr9dhYeakbKBJWzDRRAh9mu8uH eN/StIztthsP6tWhK8W92L24Br+dOFm6NtLonuEQygMkMdIdigth9iY3k0Po1Hrz SajJ8M7YCPPjyuyEX80FxNDRIbfzjrT+49udFPi/63NJHxTP9AamaU719D77szn/ AuDKLIjn0gpJUYgcJt13GxO8rfkuYq8S0CxqC7jezJo2BOFJM5yR6nd8ZTwYfk+r b5n21zUc+ycEPW0jbk7/hUTZobKRMd5z8xeOIbRRJLlrH3BB1NJItz7TL1cudJ68 S+jk3jz0j/tk9F0dG1YiDX82KfEZTpipd31ffwfV9Mnj+PG7KvL0B2B7pumeAc9h lYTZW7bO7LkEOKgUTMmk+gXlbpljp4ohoFqQhY45SJlWjuLn0f5IL+VKj7FN/F2J +Vk2nCl52syQZNr7LQVfPl2WPakC+v1Kqy//yJhOV8nHmjJ3LQXw2tzM7DeUlm/L 0xDimpY= =4lEM -----END PGP SIGNATURE----- --=-=-=--