Re: [PATCH 1/4] VFS: Add a VFS helper function vfs_remote_path_lookup()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux