Skip to content

Commit 18edb95

Browse files
foxhlchenJonathan Corbet
authored andcommitted
docs: path-lookup: no get_link()
no get_link() anymore. we have step_into() and pick_link(). walk_component() will call step_into(), in turn call pick_link, and return symlink name. Signed-off-by: Fox Chen <foxhlchen@gmail.com> Reviewed-by: NeilBrown <neilb@suse.de> Link: https://lore.kernel.org/r/20210527091618.287093-10-foxhlchen@gmail.com Signed-off-by: Jonathan Corbet <corbet@lwn.net>
1 parent 671f733 commit 18edb95

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

Documentation/filesystems/path-lookup.rst

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1103,12 +1103,10 @@ doesn't need to notice. Getting this ``name`` variable on and off the
11031103
stack is very straightforward; pushing and popping the references is
11041104
a little more complex.
11051105

1106-
When a symlink is found, ``walk_component()`` returns the value ``1``
1107-
(``0`` is returned for any other sort of success, and a negative number
1108-
is, as usual, an error indicator). This causes ``get_link()`` to be
1109-
called; it then gets the link from the filesystem. Providing that
1110-
operation is successful, the old path ``name`` is placed on the stack,
1111-
and the new value is used as the ``name`` for a while. When the end of
1106+
When a symlink is found, ``walk_component()`` calls ``pick_link()`` via ``step_into()``
1107+
which returns the link from the filesystem.
1108+
Providing that operation is successful, the old path ``name`` is placed on the
1109+
stack, and the new value is used as the ``name`` for a while. When the end of
11121110
the path is found (i.e. ``*name`` is ``'\0'``) the old ``name`` is restored
11131111
off the stack and path walking continues.
11141112

0 commit comments

Comments
 (0)