Merge branch 'for_rmk' of git://github.com/at91linux/linux-2.6-at91 into devel-stable
[pandora-kernel.git] / fs / nfs / getroot.c
index ac7b814..5596c6a 100644 (file)
@@ -63,9 +63,11 @@ static int nfs_superblock_set_dummy_root(struct super_block *sb, struct inode *i
                 * This again causes shrink_dcache_for_umount_subtree() to
                 * Oops, since the test for IS_ROOT() will fail.
                 */
-               spin_lock(&dcache_lock);
+               spin_lock(&sb->s_root->d_inode->i_lock);
+               spin_lock(&sb->s_root->d_lock);
                list_del_init(&sb->s_root->d_alias);
-               spin_unlock(&dcache_lock);
+               spin_unlock(&sb->s_root->d_lock);
+               spin_unlock(&sb->s_root->d_inode->i_lock);
        }
        return 0;
 }
@@ -119,7 +121,7 @@ struct dentry *nfs_get_root(struct super_block *sb, struct nfs_fh *mntfh)
        security_d_instantiate(ret, inode);
 
        if (ret->d_op == NULL)
-               ret->d_op = server->nfs_client->rpc_ops->dentry_ops;
+               d_set_d_op(ret, server->nfs_client->rpc_ops->dentry_ops);
 out:
        nfs_free_fattr(fsinfo.fattr);
        return ret;
@@ -226,7 +228,7 @@ struct dentry *nfs4_get_root(struct super_block *sb, struct nfs_fh *mntfh)
        security_d_instantiate(ret, inode);
 
        if (ret->d_op == NULL)
-               ret->d_op = server->nfs_client->rpc_ops->dentry_ops;
+               d_set_d_op(ret, server->nfs_client->rpc_ops->dentry_ops);
 
 out:
        nfs_free_fattr(fattr);