Re: [q] chdir/chroot by dentry and not by name.

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Mon Apr 17 2000 - 02:53:09 EST


Alexander Viro wrote:
> > It would seem that in order to, say, chdir, by given dentry I have to
> > use dentry->d_name.name and re-lookup again passing &mnt to
> > lookup_dentry()? Surely I am missing something because you wouldn't have
> > designed it this awkwardly on purpose?
>
> You _should_ _not_ chdir() by dentry. At all. Think what will happen if
> filesystem will be mounted in two different places, sharing the dentry tree.
> Dentry is not enough. And lookup_dentry() is going out - walk_name() is the
> replacement.

<raise eyebrow>

Dentries have completely changed their meaning during the second feature
freeze this year? How is it you're able to thoroughly mangle this stuff
and I can't get a simple DT_DIR patch looked at?

fchdir() does still work without races doesn't it?

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:10 EST