aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/dir.c4
-rw-r--r--fs/nfs/getroot.c6
-rw-r--r--fs/nfs/super.c1
3 files changed, 1 insertions, 10 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index abe4f0c8dc5f..95b081bc9e25 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -439,7 +439,6 @@ void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry)
439 if (dentry == NULL) 439 if (dentry == NULL)
440 return; 440 return;
441 441
442 d_set_d_op(dentry, NFS_PROTO(dir)->dentry_ops);
443 inode = nfs_fhget(dentry->d_sb, entry->fh, entry->fattr); 442 inode = nfs_fhget(dentry->d_sb, entry->fh, entry->fattr);
444 if (IS_ERR(inode)) 443 if (IS_ERR(inode))
445 goto out; 444 goto out;
@@ -1193,8 +1192,6 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru
1193 if (dentry->d_name.len > NFS_SERVER(dir)->namelen) 1192 if (dentry->d_name.len > NFS_SERVER(dir)->namelen)
1194 goto out; 1193 goto out;
1195 1194
1196 d_set_d_op(dentry, NFS_PROTO(dir)->dentry_ops);
1197
1198 /* 1195 /*
1199 * If we're doing an exclusive create, optimize away the lookup 1196 * If we're doing an exclusive create, optimize away the lookup
1200 * but don't hash the dentry. 1197 * but don't hash the dentry.
@@ -1338,7 +1335,6 @@ static struct dentry *nfs_atomic_lookup(struct inode *dir, struct dentry *dentry
1338 res = ERR_PTR(-ENAMETOOLONG); 1335 res = ERR_PTR(-ENAMETOOLONG);
1339 goto out; 1336 goto out;
1340 } 1337 }
1341 d_set_d_op(dentry, NFS_PROTO(dir)->dentry_ops);
1342 1338
1343 /* Let vfs_create() deal with O_EXCL. Instantiate, but don't hash 1339 /* Let vfs_create() deal with O_EXCL. Instantiate, but don't hash
1344 * the dentry. */ 1340 * the dentry. */
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c
index 5596c6a2881e..b5ffe8fa291f 100644
--- a/fs/nfs/getroot.c
+++ b/fs/nfs/getroot.c
@@ -119,9 +119,6 @@ struct dentry *nfs_get_root(struct super_block *sb, struct nfs_fh *mntfh)
119 } 119 }
120 120
121 security_d_instantiate(ret, inode); 121 security_d_instantiate(ret, inode);
122
123 if (ret->d_op == NULL)
124 d_set_d_op(ret, server->nfs_client->rpc_ops->dentry_ops);
125out: 122out:
126 nfs_free_fattr(fsinfo.fattr); 123 nfs_free_fattr(fsinfo.fattr);
127 return ret; 124 return ret;
@@ -227,9 +224,6 @@ struct dentry *nfs4_get_root(struct super_block *sb, struct nfs_fh *mntfh)
227 224
228 security_d_instantiate(ret, inode); 225 security_d_instantiate(ret, inode);
229 226
230 if (ret->d_op == NULL)
231 d_set_d_op(ret, server->nfs_client->rpc_ops->dentry_ops);
232
233out: 227out:
234 nfs_free_fattr(fattr); 228 nfs_free_fattr(fattr);
235 dprintk("<-- nfs4_get_root()\n"); 229 dprintk("<-- nfs4_get_root()\n");
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 0f9ea73e7789..b68c8607770f 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -2202,6 +2202,7 @@ static int nfs_set_super(struct super_block *s, void *data)
2202 2202
2203 s->s_flags = sb_mntdata->mntflags; 2203 s->s_flags = sb_mntdata->mntflags;
2204 s->s_fs_info = server; 2204 s->s_fs_info = server;
2205 s->s_d_op = server->nfs_client->rpc_ops->dentry_ops;
2205 ret = set_anon_super(s, server); 2206 ret = set_anon_super(s, server);
2206 if (ret == 0) 2207 if (ret == 0)
2207 server->s_dev = s->s_dev; 2208 server->s_dev = s->s_dev;