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/exportfs | |
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/exportfs')
-rw-r--r-- | fs/exportfs/expfs.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c index 51b304056f10..84b8c460a781 100644 --- a/fs/exportfs/expfs.c +++ b/fs/exportfs/expfs.c @@ -48,8 +48,10 @@ find_acceptable_alias(struct dentry *result, return result; spin_lock(&dcache_lock); + spin_lock(&dcache_inode_lock); list_for_each_entry(dentry, &result->d_inode->i_dentry, d_alias) { dget_locked(dentry); + spin_unlock(&dcache_inode_lock); spin_unlock(&dcache_lock); if (toput) dput(toput); @@ -58,8 +60,10 @@ find_acceptable_alias(struct dentry *result, return dentry; } spin_lock(&dcache_lock); + spin_lock(&dcache_inode_lock); toput = dentry; } + spin_unlock(&dcache_inode_lock); spin_unlock(&dcache_lock); if (toput) |