lkml.org 
[lkml]   [1998]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: symlinks.


On Tue, 14 Apr 1998, Adam D. Bradley wrote:
>
> Hmm... comments in the code (fs/namei.c) claim:

The comment is simply wrong, it's a remnant from a very early first
implementation of the dcache. Ignore the comment, the code is correct and
does it recursively.

Changing it to iterate would be fine, but is much harder to do than it
initially looks. If you do change it, make _sure_ that recursive symlinks
work in the _middle_ of a symlink traversal - ie you cannot and must not
do symlinks as "tailcall recursion" because while that actually works for
a huge percentage of how symlinks are used it is not how symlinks actually
work.

In short, it needs a lookup stack - we're using recursion to get that "for
free", and any iterative version would have to implement the symlink
lookup stack by hand.

Linus


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.061 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site