Skip to content

Commit 4a00e4b

Browse files
foxhlchenJonathan Corbet
authored andcommitted
docs: path-lookup: i_op->follow_link replaced with i_op->get_link
follow_link has been replaced by get_link() which can be called in RCU mode. see commit: commit 6b25539 ("replace ->follow_link() with new method that could stay in RCU mode") Signed-off-by: Fox Chen <foxhlchen@gmail.com> Reviewed-by: NeilBrown <neilb@suse.de> Link: https://lore.kernel.org/r/20210527091618.287093-8-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent d2d3dd5 commit 4a00e4b

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

Documentation/filesystems/path-lookup.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,13 +1060,11 @@ filesystem cannot successfully get a reference in RCU-walk mode, it
10601060
must return ``-ECHILD`` and ``unlazy_walk()`` will be called to return to
10611061
REF-walk mode in which the filesystem is allowed to sleep.
10621062

1063-
The place for all this to happen is the ``i_op->follow_link()`` inode
1064-
method. In the present mainline code this is never actually called in
1065-
RCU-walk mode as the rewrite is not quite complete. It is likely that
1066-
in a future release this method will be passed an ``inode`` pointer when
1067-
called in RCU-walk mode so it both (1) knows to be careful, and (2) has the
1068-
validated pointer. Much like the ``i_op->permission()`` method we
1069-
looked at previously, ``->follow_link()`` would need to be careful that
1063+
The place for all this to happen is the ``i_op->get_link()`` inode
1064+
method. This is called both in RCU-walk and REF-walk. In RCU-walk the
1065+
``dentry*`` argument is NULL, ``->get_link()`` can return -ECHILD to drop out of
1066+
RCU-walk. Much like the ``i_op->permission()`` method we
1067+
looked at previously, ``->get_link()`` would need to be careful that
10701068
all the data structures it references are safe to be accessed while
10711069
holding no counted reference, only the RCU lock. Though getting a
10721070
reference with ``->follow_link()`` is not yet done in RCU-walk mode, the

0 commit comments

Comments
 (0)