From: James Antill <james@and.org>
To: Andrew Walrond <andrew@walrond.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Symlink indirection
Date: 13 Dec 2002 12:24:15 -0500 [thread overview]
Message-ID: <m33cp1al34.fsf@code.and.org> (raw)
In-Reply-To: <3DFA0C20.3020000@walrond.org>
Andrew Walrond <andrew@walrond.org> writes:
> Hi James.
>
> Thanks for the info; my application is now entirely plausible :)
> And apologies for asking an FAQ. (Google didn't throw up anything useful)
Sorry, this was an error on my part, I shouldn't reply to Richard's
posts until I've calmed down.
> BTW is documented anywhere except the code?
Apart from this mailing list, not AFAIK.
> > The link count is for recursively following symlinks, as the
> > original
>
> > question wanted to know ... and has been discussed on lkml numerous
> > times.
> > Andrew, one extra piece of information you might not know is that
> > the
>
> > above value doesn't come into play when the new symlink is the last
> > element in the new path, then you get a higher value.
> > The full code...
> > if (current->link_count >= max_recursive_link)
>
> > goto loop;
> > if (current->total_link_count >= 40)
> > goto loop;
> > [...]
> > current->link_count++;
> > current->total_link_count++;
> > UPDATE_ATIME(dentry->d_inode);
> > err = dentry->d_inode->i_op->follow_link(dentry, nd);
> > current->link_count--;
> > ...Ie. a link from /a -> /b/c where "b" is a symlink takes the
>
> > "max_recursive_link" value (5 on vanilla kernels) but if "/b/c" was a
> > symlink then you get to use the 40 value.
The last part of the path is still part of the follow_link, and thus
subject to the non-total link_count value. The only times you get the
bigger value is...
/a -> /b/c
/b -> /b.1 -> /b.2 -> /b.3 -> /b.4
/b.4/c -> /b.4/c.1 -> /b.4/c.2 -> /b.4/c.3 -> /b.4/c.4
...here you can open /a even if you'll follow more than ->link_count
links.
--
# James Antill -- james@and.org
:0:
* ^From: .*james@and\.org
/dev/null
next prev parent reply other threads:[~2002-12-13 17:16 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-13 15:06 Symlink indirection Andrew Walrond
2002-12-13 15:11 ` Marc-Christian Petersen
2002-12-13 15:20 ` Andrew Walrond
2002-12-13 17:22 ` Alan Cox
2002-12-13 15:30 ` Richard B. Johnson
2002-12-13 16:17 ` James Antill
2002-12-13 16:34 ` Andrew Walrond
2002-12-13 17:24 ` James Antill [this message]
2002-12-13 16:24 ` Andrew Walrond
2002-12-13 16:26 ` Jesse Pollard
2002-12-13 15:23 ` Richard B. Johnson
2002-12-13 16:41 ` Alfred M. Szmidt
2002-12-13 16:51 ` Jeff Bailey
2002-12-13 17:15 ` Amos Waterland
2002-12-13 17:51 ` Richard B. Johnson
[not found] ` <mailman.1039792562.8768.linux-kernel2news@redhat.com>
2002-12-13 16:16 ` Pete Zaitcev
2002-12-13 16:48 ` Andrew Walrond
2002-12-13 16:55 ` Pete Zaitcev
2002-12-13 17:04 ` Andrew Walrond
2002-12-14 5:57 ` Joseph Fannin
2002-12-14 12:47 ` Andrew Walrond
2002-12-14 13:55 ` John Bradford
2002-12-14 14:00 ` Andrew Walrond
2002-12-14 16:13 ` John Bradford
2002-12-14 19:50 ` Stephen Wille Padnos
2002-12-15 0:41 ` Andrew Walrond
2002-12-23 5:58 ` Thomas Zimmerman
2002-12-13 17:32 ` James Antill
[not found] <fa.eib7vkv.1tju08k@ifi.uio.no>
[not found] ` <fa.cnblikv.qjmuqd@ifi.uio.no>
2002-12-15 7:24 ` junkio
2002-12-15 12:17 ` Andrew Walrond
2002-12-15 12:58 ` John Bradford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m33cp1al34.fsf@code.and.org \
--to=james@and.org \
--cc=andrew@walrond.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.