diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 17:49:35 +1100 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 17:50:22 +1100 |
commit | b23fb0a60379a95e10c671f646b259ea2558421e (patch) | |
tree | 7c3644b91241d32fda502a7be0b78e4c225f8091 /fs/ocfs2/dcache.c | |
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/dcache.c')
-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 35e5f5a9ef5..c31b5c647ac 100644 --- a/fs/ocfs2/dcache.c +++ b/fs/ocfs2/dcache.c @@ -170,7 +170,7 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode, struct dentry *dentry = NULL; spin_lock(&dcache_lock); - + spin_lock(&dcache_inode_lock); list_for_each(p, &inode->i_dentry) { dentry = list_entry(p, struct dentry, d_alias); @@ -188,6 +188,7 @@ struct dentry *ocfs2_find_local_alias(struct inode *inode, dentry = NULL; } + spin_unlock(&dcache_inode_lock); spin_unlock(&dcache_lock); return dentry; |