diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:49:38 -0500 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:50:23 -0500 |
commit | b5c84bf6f6fa3a7dfdcb556023a62953574b60ee (patch) | |
tree | 7a2c299a180713e21d5cb653cb933121adf53c31 /fs/libfs.c | |
parent | 949854d02455080d20cd3e1db28a3a18daf7599d (diff) |
fs: dcache remove dcache_lock
dcache_lock no longer protects anything. remove it.
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/libfs.c')
-rw-r--r-- | fs/libfs.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index cc4794914b52..28b36663c44e 100644 --- a/fs/libfs.c +++ b/fs/libfs.c | |||
@@ -100,7 +100,6 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin) | |||
100 | struct dentry *cursor = file->private_data; | 100 | struct dentry *cursor = file->private_data; |
101 | loff_t n = file->f_pos - 2; | 101 | loff_t n = file->f_pos - 2; |
102 | 102 | ||
103 | spin_lock(&dcache_lock); | ||
104 | spin_lock(&dentry->d_lock); | 103 | spin_lock(&dentry->d_lock); |
105 | /* d_lock not required for cursor */ | 104 | /* d_lock not required for cursor */ |
106 | list_del(&cursor->d_u.d_child); | 105 | list_del(&cursor->d_u.d_child); |
@@ -116,7 +115,6 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin) | |||
116 | } | 115 | } |
117 | list_add_tail(&cursor->d_u.d_child, p); | 116 | list_add_tail(&cursor->d_u.d_child, p); |
118 | spin_unlock(&dentry->d_lock); | 117 | spin_unlock(&dentry->d_lock); |
119 | spin_unlock(&dcache_lock); | ||
120 | } | 118 | } |
121 | } | 119 | } |
122 | mutex_unlock(&dentry->d_inode->i_mutex); | 120 | mutex_unlock(&dentry->d_inode->i_mutex); |
@@ -159,7 +157,6 @@ int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir) | |||
159 | i++; | 157 | i++; |
160 | /* fallthrough */ | 158 | /* fallthrough */ |
161 | default: | 159 | default: |
162 | spin_lock(&dcache_lock); | ||
163 | spin_lock(&dentry->d_lock); | 160 | spin_lock(&dentry->d_lock); |
164 | if (filp->f_pos == 2) | 161 | if (filp->f_pos == 2) |
165 | list_move(q, &dentry->d_subdirs); | 162 | list_move(q, &dentry->d_subdirs); |
@@ -175,13 +172,11 @@ int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir) | |||
175 | 172 | ||
176 | spin_unlock(&next->d_lock); | 173 | spin_unlock(&next->d_lock); |
177 | spin_unlock(&dentry->d_lock); | 174 | spin_unlock(&dentry->d_lock); |
178 | spin_unlock(&dcache_lock); | ||
179 | if (filldir(dirent, next->d_name.name, | 175 | if (filldir(dirent, next->d_name.name, |
180 | next->d_name.len, filp->f_pos, | 176 | next->d_name.len, filp->f_pos, |
181 | next->d_inode->i_ino, | 177 | next->d_inode->i_ino, |
182 | dt_type(next->d_inode)) < 0) | 178 | dt_type(next->d_inode)) < 0) |
183 | return 0; | 179 | return 0; |
184 | spin_lock(&dcache_lock); | ||
185 | spin_lock(&dentry->d_lock); | 180 | spin_lock(&dentry->d_lock); |
186 | spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED); | 181 | spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED); |
187 | /* next is still alive */ | 182 | /* next is still alive */ |
@@ -191,7 +186,6 @@ int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir) | |||
191 | filp->f_pos++; | 186 | filp->f_pos++; |
192 | } | 187 | } |
193 | spin_unlock(&dentry->d_lock); | 188 | spin_unlock(&dentry->d_lock); |
194 | spin_unlock(&dcache_lock); | ||
195 | } | 189 | } |
196 | return 0; | 190 | return 0; |
197 | } | 191 | } |
@@ -285,7 +279,6 @@ int simple_empty(struct dentry *dentry) | |||
285 | struct dentry *child; | 279 | struct dentry *child; |
286 | int ret = 0; | 280 | int ret = 0; |
287 | 281 | ||
288 | spin_lock(&dcache_lock); | ||
289 | spin_lock(&dentry->d_lock); | 282 | spin_lock(&dentry->d_lock); |
290 | list_for_each_entry(child, &dentry->d_subdirs, d_u.d_child) { | 283 | list_for_each_entry(child, &dentry->d_subdirs, d_u.d_child) { |
291 | spin_lock_nested(&child->d_lock, DENTRY_D_LOCK_NESTED); | 284 | spin_lock_nested(&child->d_lock, DENTRY_D_LOCK_NESTED); |
@@ -298,7 +291,6 @@ int simple_empty(struct dentry *dentry) | |||
298 | ret = 1; | 291 | ret = 1; |
299 | out: | 292 | out: |
300 | spin_unlock(&dentry->d_lock); | 293 | spin_unlock(&dentry->d_lock); |
301 | spin_unlock(&dcache_lock); | ||
302 | return ret; | 294 | return ret; |
303 | } | 295 | } |
304 | 296 | ||