switch nfs to ->s_d_op
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Dec 2010 16:29:39 +0000 (11:29 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 13 Jan 2011 01:02:45 +0000 (20:02 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/nfs/dir.c
fs/nfs/getroot.c
fs/nfs/super.c

index abe4f0c8dc5f927b8673d5f63764140dc874ff88..95b081bc9e25fbbfcb702c19e4b9fc4bf4336dc8 100644 (file)
@@ -439,7 +439,6 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry)
        if (dentry == NULL)
                return;
 
-       d_set_d_op(dentry, NFS_PROTO(dir)->dentry_ops);
        inode = nfs_fhget(dentry->d_sb, entry->fh, entry->fattr);
        if (IS_ERR(inode))
                goto out;
@@ -1193,8 +1192,6 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru
        if (dentry->d_name.len > NFS_SERVER(dir)->namelen)
                goto out;
 
-       d_set_d_op(dentry, NFS_PROTO(dir)->dentry_ops);
-
        /*
         * If we're doing an exclusive create, optimize away the lookup
         * but don't hash the dentry.
@@ -1338,7 +1335,6 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry
                res = ERR_PTR(-ENAMETOOLONG);
                goto out;
        }
-       d_set_d_op(dentry, NFS_PROTO(dir)->dentry_ops);
 
        /* Let vfs_create() deal with O_EXCL. Instantiate, but don't hash
         * the dentry. */
index 5596c6a2881e01ec1dd9f2689f987661088b92d7..b5ffe8fa291f73c2f1ad0a43bc42b3186158a911 100644 (file)
@@ -119,9 +119,6 @@ struct dentry *nfs_get_root(struct super_block *sb, struct nfs_fh *mntfh)
        }
 
        security_d_instantiate(ret, inode);
-
-       if (ret->d_op == NULL)
-               d_set_d_op(ret, server->nfs_client->rpc_ops->dentry_ops);
 out:
        nfs_free_fattr(fsinfo.fattr);
        return ret;
@@ -227,9 +224,6 @@ struct dentry *nfs4_get_root(struct super_block *sb, struct nfs_fh *mntfh)
 
        security_d_instantiate(ret, inode);
 
-       if (ret->d_op == NULL)
-               d_set_d_op(ret, server->nfs_client->rpc_ops->dentry_ops);
-
 out:
        nfs_free_fattr(fattr);
        dprintk("<-- nfs4_get_root()\n");
index 0f9ea73e77892bf3e3e84cc50f9f6625671d5a6f..b68c8607770fcf09188882f6823b69f894aa24d7 100644 (file)
@@ -2202,6 +2202,7 @@ static int nfs_set_super(struct super_block *s, void *data)
 
        s->s_flags = sb_mntdata->mntflags;
        s->s_fs_info = server;
+       s->s_d_op = server->nfs_client->rpc_ops->dentry_ops;
        ret = set_anon_super(s, server);
        if (ret == 0)
                server->s_dev = s->s_dev;