On Thu, Apr 02, 2009 at 06:16:25PM -0400, Trond Myklebust wrote: > On Thu, 2009-04-02 at 21:54 +0100, Al Viro wrote: > > > The other thing we'd need is a 'root' path argument to ensure that > > > __vfs_follow_link() does the right thing when presented with an absolute > > > symlink. > > > > The only problem I see with this is that we'll get root vfsmount/dentry > > refcount jerked on *all* lookups now, instead of just the absolute > > ones... > > How about using a LOOKUP_ROOT_SET nd->flag to switch between use of > current->fs->root or nd->root? That allows you to keep the default > behaviour of not changing the root refcount. Eww... Let's not. First of all, the really useful part of nd->root for normal case is that it allows to get ...->fs->root once. So it's better to *cache* ->fs->root in there. At which point the flag disappears, since it becomes simply nd->root.mnt != NULL. The interesting part is keeping refcounting happy. I'll see how to do that - it's clearly useful on its own. Hopefully will post later tonight... -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html