diff options
Diffstat (limited to 'fs/nfs/getroot.c')
-rw-r--r-- | fs/nfs/getroot.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c index ac7b814ce162..5596c6a2881e 100644 --- a/fs/nfs/getroot.c +++ b/fs/nfs/getroot.c | |||
@@ -63,9 +63,11 @@ static int nfs_superblock_set_dummy_root(struct super_block *sb, struct inode *i | |||
63 | * This again causes shrink_dcache_for_umount_subtree() to | 63 | * This again causes shrink_dcache_for_umount_subtree() to |
64 | * Oops, since the test for IS_ROOT() will fail. | 64 | * Oops, since the test for IS_ROOT() will fail. |
65 | */ | 65 | */ |
66 | spin_lock(&dcache_lock); | 66 | spin_lock(&sb->s_root->d_inode->i_lock); |
67 | spin_lock(&sb->s_root->d_lock); | ||
67 | list_del_init(&sb->s_root->d_alias); | 68 | list_del_init(&sb->s_root->d_alias); |
68 | spin_unlock(&dcache_lock); | 69 | spin_unlock(&sb->s_root->d_lock); |
70 | spin_unlock(&sb->s_root->d_inode->i_lock); | ||
69 | } | 71 | } |
70 | return 0; | 72 | return 0; |
71 | } | 73 | } |
@@ -119,7 +121,7 @@ struct dentry *nfs_get_root(struct super_block *sb, struct nfs_fh *mntfh) | |||
119 | security_d_instantiate(ret, inode); | 121 | security_d_instantiate(ret, inode); |
120 | 122 | ||
121 | if (ret->d_op == NULL) | 123 | if (ret->d_op == NULL) |
122 | ret->d_op = server->nfs_client->rpc_ops->dentry_ops; | 124 | d_set_d_op(ret, server->nfs_client->rpc_ops->dentry_ops); |
123 | out: | 125 | out: |
124 | nfs_free_fattr(fsinfo.fattr); | 126 | nfs_free_fattr(fsinfo.fattr); |
125 | return ret; | 127 | return ret; |
@@ -226,7 +228,7 @@ struct dentry *nfs4_get_root(struct super_block *sb, struct nfs_fh *mntfh) | |||
226 | security_d_instantiate(ret, inode); | 228 | security_d_instantiate(ret, inode); |
227 | 229 | ||
228 | if (ret->d_op == NULL) | 230 | if (ret->d_op == NULL) |
229 | ret->d_op = server->nfs_client->rpc_ops->dentry_ops; | 231 | d_set_d_op(ret, server->nfs_client->rpc_ops->dentry_ops); |
230 | 232 | ||
231 | out: | 233 | out: |
232 | nfs_free_fattr(fattr); | 234 | nfs_free_fattr(fattr); |