aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorNick Piggin <npiggin@kernel.dk>2011-01-07 01:49:35 -0500
committerNick Piggin <npiggin@kernel.dk>2011-01-07 01:50:22 -0500
commitb23fb0a60379a95e10c671f646b259ea2558421e (patch)
tree7c3644b91241d32fda502a7be0b78e4c225f8091 /fs/cifs
parent2fd6b7f50797f2e993eea59e0a0b8c6399c811dc (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/cifs')
-rw-r--r--fs/cifs/inode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 589f3e3f6e00..003698365ece 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -810,12 +810,15 @@ inode_has_hashed_dentries(struct inode *inode)
810 struct dentry *dentry; 810 struct dentry *dentry;
811 811
812 spin_lock(&dcache_lock); 812 spin_lock(&dcache_lock);
813 spin_lock(&dcache_inode_lock);
813 list_for_each_entry(dentry, &inode->i_dentry, d_alias) { 814 list_for_each_entry(dentry, &inode->i_dentry, d_alias) {
814 if (!d_unhashed(dentry) || IS_ROOT(dentry)) { 815 if (!d_unhashed(dentry) || IS_ROOT(dentry)) {
816 spin_unlock(&dcache_inode_lock);
815 spin_unlock(&dcache_lock); 817 spin_unlock(&dcache_lock);
816 return true; 818 return true;
817 } 819 }
818 } 820 }
821 spin_unlock(&dcache_inode_lock);
819 spin_unlock(&dcache_lock); 822 spin_unlock(&dcache_lock);
820 return false; 823 return false;
821} 824}