aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/dir.c3
-rw-r--r--fs/nfs/getroot.c2
-rw-r--r--fs/nfs/namespace.c3
3 files changed, 0 insertions, 8 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 12de824edb5c..eb77471b8823 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1718,11 +1718,9 @@ static int nfs_unlink(struct inode *dir, struct dentry *dentry)
1718 dfprintk(VFS, "NFS: unlink(%s/%ld, %s)\n", dir->i_sb->s_id, 1718 dfprintk(VFS, "NFS: unlink(%s/%ld, %s)\n", dir->i_sb->s_id,
1719 dir->i_ino, dentry->d_name.name); 1719 dir->i_ino, dentry->d_name.name);
1720 1720
1721 spin_lock(&dcache_lock);
1722 spin_lock(&dentry->d_lock); 1721 spin_lock(&dentry->d_lock);
1723 if (dentry->d_count > 1) { 1722 if (dentry->d_count > 1) {
1724 spin_unlock(&dentry->d_lock); 1723 spin_unlock(&dentry->d_lock);
1725 spin_unlock(&dcache_lock);
1726 /* Start asynchronous writeout of the inode */ 1724 /* Start asynchronous writeout of the inode */
1727 write_inode_now(dentry->d_inode, 0); 1725 write_inode_now(dentry->d_inode, 0);
1728 error = nfs_sillyrename(dir, dentry); 1726 error = nfs_sillyrename(dir, dentry);
@@ -1733,7 +1731,6 @@ static int nfs_unlink(struct inode *dir, struct dentry *dentry)
1733 need_rehash = 1; 1731 need_rehash = 1;
1734 } 1732 }
1735 spin_unlock(&dentry->d_lock); 1733 spin_unlock(&dentry->d_lock);
1736 spin_unlock(&dcache_lock);
1737 error = nfs_safe_remove(dentry); 1734 error = nfs_safe_remove(dentry);
1738 if (!error || error == -ENOENT) { 1735 if (!error || error == -ENOENT) {
1739 nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); 1736 nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
diff --git a/fs/nfs/getroot.c b/fs/nfs/getroot.c
index 850f67d5f0ac..b3e36c3430de 100644
--- a/fs/nfs/getroot.c
+++ b/fs/nfs/getroot.c
@@ -63,13 +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);
67 spin_lock(&dcache_inode_lock); 66 spin_lock(&dcache_inode_lock);
68 spin_lock(&sb->s_root->d_lock); 67 spin_lock(&sb->s_root->d_lock);
69 list_del_init(&sb->s_root->d_alias); 68 list_del_init(&sb->s_root->d_alias);
70 spin_unlock(&sb->s_root->d_lock); 69 spin_unlock(&sb->s_root->d_lock);
71 spin_unlock(&dcache_inode_lock); 70 spin_unlock(&dcache_inode_lock);
72 spin_unlock(&dcache_lock);
73 } 71 }
74 return 0; 72 return 0;
75} 73}
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
index 78c0ebb0b07c..74aaf3963c10 100644
--- a/fs/nfs/namespace.c
+++ b/fs/nfs/namespace.c
@@ -60,7 +60,6 @@ rename_retry:
60 60
61 seq = read_seqbegin(&rename_lock); 61 seq = read_seqbegin(&rename_lock);
62 rcu_read_lock(); 62 rcu_read_lock();
63 spin_lock(&dcache_lock);
64 while (!IS_ROOT(dentry) && dentry != droot) { 63 while (!IS_ROOT(dentry) && dentry != droot) {
65 namelen = dentry->d_name.len; 64 namelen = dentry->d_name.len;
66 buflen -= namelen + 1; 65 buflen -= namelen + 1;
@@ -71,7 +70,6 @@ rename_retry:
71 *--end = '/'; 70 *--end = '/';
72 dentry = dentry->d_parent; 71 dentry = dentry->d_parent;
73 } 72 }
74 spin_unlock(&dcache_lock);
75 rcu_read_unlock(); 73 rcu_read_unlock();
76 if (read_seqretry(&rename_lock, seq)) 74 if (read_seqretry(&rename_lock, seq))
77 goto rename_retry; 75 goto rename_retry;
@@ -91,7 +89,6 @@ rename_retry:
91 memcpy(end, base, namelen); 89 memcpy(end, base, namelen);
92 return end; 90 return end;
93Elong_unlock: 91Elong_unlock:
94 spin_unlock(&dcache_lock);
95 rcu_read_unlock(); 92 rcu_read_unlock();
96 if (read_seqretry(&rename_lock, seq)) 93 if (read_seqretry(&rename_lock, seq))
97 goto rename_retry; 94 goto rename_retry;