NFS: Use d_automount() rather than abusing follow_link()
Make NFS use the new d_automount() dentry operation rather than abusing follow_link() on directories. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com> Acked-by: Ian Kent <raven@themaw.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -970,7 +970,7 @@ int nfs_lookup_verify_inode(struct inode *inode, struct nameidata *nd)
|
||||
{
|
||||
struct nfs_server *server = NFS_SERVER(inode);
|
||||
|
||||
if (test_bit(NFS_INO_MOUNTPOINT, &NFS_I(inode)->flags))
|
||||
if (IS_AUTOMOUNT(inode))
|
||||
return 0;
|
||||
if (nd != NULL) {
|
||||
/* VFS wants an on-the-wire revalidation */
|
||||
@@ -1173,6 +1173,7 @@ const struct dentry_operations nfs_dentry_operations = {
|
||||
.d_revalidate = nfs_lookup_revalidate,
|
||||
.d_delete = nfs_dentry_delete,
|
||||
.d_iput = nfs_dentry_iput,
|
||||
.d_automount = nfs_d_automount,
|
||||
};
|
||||
|
||||
static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
|
||||
@@ -1246,6 +1247,7 @@ const struct dentry_operations nfs4_dentry_operations = {
|
||||
.d_revalidate = nfs_open_revalidate,
|
||||
.d_delete = nfs_dentry_delete,
|
||||
.d_iput = nfs_dentry_iput,
|
||||
.d_automount = nfs_d_automount,
|
||||
};
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user