Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2088950pxb; Sun, 18 Apr 2021 18:29:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFQPRKPkPJfidMcQuTHJRoCZIgDYcXjVid/eToYoeMB64bYi9+KjR7VD3MsaRIEABcsZNA X-Received: by 2002:a17:90a:fe04:: with SMTP id ck4mr3691935pjb.10.1618795744231; Sun, 18 Apr 2021 18:29:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618795744; cv=none; d=google.com; s=arc-20160816; b=oWmQlND07XWNGZMNklkle2Sywyf0lvEUXgop59dIYTtI3nAF2CDrKuWuJ9ydUy5/RP hUuhNFlolTtUK5autY7ceYRsCf8SQfAUZeAocYLq8mYlBoGqq8GrED8Xule1INejmxuv XEFVlb8DksadbGjDfhGFWoArHTDNzg139MVd0aYYZnretCub5LzwxrZ2x0N8JE7JZvhc bdXB505wPeXD7nBlhlBm66NMLP076J3MiMohw/oYbH/MXZVxkH97qc2euKhGZ60PP7GJ U7KnGpiA4WkJczoTNldl5c/5tl6AN7I7oaGEscAweolnH8GXGlL930k/voHYNSay/+rd 4F1g== 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=xK1RMpgX9j9/zF11XC8xRMVXaYJptiHJ+G7VtpIOLmU=; b=mYP5R7uhcnpxyPj3FdxtoKJ62B9QhB0vBJPSOo0bKWi4v09soG/wHcqWojWlWZfsyB atwhx0o7ayDUVwWh9e7P3X+UmFPCCGnMj6JodpjDqpHjLqeuIADKGer6WJZaDM4DLPNb SZnYb1byDENSQlC0VAnb+xIOmCdOgKsbT3mD1s5m+yEs0T/ME9BdvMkanLrcHLMqEJlY INjTTBCbAIADWz0LuQd5CPYv1SG1uHCsZnxyyE/2i1vLjguT2tmkEZy2zhxX/SnnotCN pNq9JwkOVDZSl9iyQt+EWpmLhbtFlhoCM5nnaSbbToh9equEfrHcV6/VHCQ5wlCBYtef e4nQ== 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 s10si14513632plr.275.2021.04.18.18.28.52; Sun, 18 Apr 2021 18:29:04 -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 S233150AbhDSB2w (ORCPT + 99 others); Sun, 18 Apr 2021 21:28:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:55420 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232133AbhDSB2u (ORCPT ); Sun, 18 Apr 2021 21:28:50 -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 904FDAEFF; Mon, 19 Apr 2021 01:28:20 +0000 (UTC) From: NeilBrown To: Fox Chen Date: Mon, 19 Apr 2021 11:28:14 +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 07/12] docs: path-lookup: i_op->follow_link replaced with i_op->get_link In-Reply-To: <20210316054727.25655-8-foxhlchen@gmail.com> References: <20210316054727.25655-1-foxhlchen@gmail.com> <20210316054727.25655-8-foxhlchen@gmail.com> Message-ID: <871rb72hch.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: > follow_link has been replaced by get_link() which can be > called in RCU mode. > > see commit: commit 6b2553918d8b ("replace ->follow_link() with > new method that could stay in RCU mode") > > Signed-off-by: Fox Chen Reviewed-By: NeilBrown Thanks, NeilBrown > --- > 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 af5c20fecfef..e6b6c43ff0f6 100644 > --- a/Documentation/filesystems/path-lookup.rst > +++ b/Documentation/filesystems/path-lookup.rst > @@ -1060,13 +1060,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 dro= p out of > +RCU-walk. Much like the ``i_op->permission()`` method we > +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.2 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJCBAEBCAAsFiEEG8Yp69OQ2HB7X0l6Oeye3VZigbkFAmB83K4OHG5laWxiQHN1 c2UuZGUACgkQOeye3VZigbksiQ//XnE5L+ary/pEvObxJRRgjdGapcR/B9d+4A6U GQOrZ+ZGWVlSA3w1bopmuJyN1SFhoXNzTEo5nL2LaDisyymiVU9tfebfzdCAnuee IQa1GxW80h95c44BoAbdVaIdhf2Q9/XPnUNUIRxmOXB/NXSr+NRIo+0B2TTWtxdR He4bD4VoU6a0VO0OR0ZBpmrhX21KTo3m0sRiA3mjUZ4MR6qxEnrim9+YP7WH5p5W LsoHsQ+F5LAMA6cI6sXazCIhviVR6ebSmP9p6A+Ra1r05g+2fRtZafWnN1pZf8ok 13dSoI+Sd0Ayv0eqeZ0Fg/OhEOb1z22TJaNYxD7z+m/5IW4TBhKnXGLv2pItuJZF sKyCrkuec3wuSXCm67qUheU30SCekvHSge/bY4FZKUAes5Z7+OiADJvvREm/J9as ykY+NDob/GOJWZryfwzHM88nc6du/J1U/b3HaItOJHvt6hoIqo0H5O+2MS8RaMM9 xmmoquiyJ87uiiBZJKkAldrjPW9rgPPz+5rDhNFwvTPXA/TJqj/ntGQ0ZY1J2JdU LgmBLZRYOfD6zdBA9xot1Epua3qBC2gCpUJsmMjyvyVGZ9nLl3xqdDLAtphCvYE5 xREZngB8qFS1NScGh0fyFhnRq+1kGXoxYWRZF14jDpHOVJULxnIPid6Aq4Dtd6BW RRscibg= =IY0x -----END PGP SIGNATURE----- --=-=-=--