diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:49:35 -0500 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:50:22 -0500 |
commit | b23fb0a60379a95e10c671f646b259ea2558421e (patch) | |
tree | 7c3644b91241d32fda502a7be0b78e4c225f8091 /fs/ocfs2 | |
parent | 2fd6b7f50797f2e993eea59e0a0b8c6399c811dc (diff) |
fs: scale inode alias list
Add a new lock, dcache_inode_lock, to protect the inode's i_dentry list
from concurrent modification. d_alias is also protected by d_lock.
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/dcache.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ocfs2/dcache.c b/fs/ocfs2/dcache.c index 35e5f5a9ef59..c31b5c647ac7 100644 --- a/fs/ocfs2/dcache.c +++ b/fs/ocfs2/dcache.c | |||
@@ -170,7 +170,7 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode, | |||
170 | struct dentry *dentry = NULL; | 170 | struct dentry *dentry = NULL; |
171 | 171 | ||
172 | spin_lock(&dcache_lock); | 172 | spin_lock(&dcache_lock); |
173 | 173 | spin_lock(&dcache_inode_lock); | |
174 | list_for_each(p, &inode->i_dentry) { | 174 | list_for_each(p, &inode->i_dentry) { |
175 | dentry = list_entry(p, struct dentry, d_alias); | 175 | dentry = list_entry(p, struct dentry, d_alias); |
176 | 176 | ||
@@ -188,6 +188,7 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode, | |||
188 | dentry = NULL; | 188 | dentry = NULL; |
189 | } | 189 | } |
190 | 190 | ||
191 | spin_unlock(&dcache_inode_lock); | ||
191 | spin_unlock(&dcache_lock); | 192 | spin_unlock(&dcache_lock); |
192 | 193 | ||
193 | return dentry; | 194 | return dentry; |