diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 07:49:35 +0100 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 07:50:22 +0100 |
commit | b23fb0a60379a95e10c671f646b259ea2558421e (patch) | |
tree | 7c3644b91241d32fda502a7be0b78e4c225f8091 /fs/cifs/inode.c | |
parent | fs: dcache scale subdirs (diff) | |
download | linux-b23fb0a60379a95e10c671f646b259ea2558421e.tar.xz linux-b23fb0a60379a95e10c671f646b259ea2558421e.zip |
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/inode.c')
-rw-r--r-- | fs/cifs/inode.c | 3 |
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) struct dentry *dentry; spin_lock(&dcache_lock); + spin_lock(&dcache_inode_lock); list_for_each_entry(dentry, &inode->i_dentry, d_alias) { if (!d_unhashed(dentry) || IS_ROOT(dentry)) { + spin_unlock(&dcache_inode_lock); spin_unlock(&dcache_lock); return true; } } + spin_unlock(&dcache_inode_lock); spin_unlock(&dcache_lock); return false; } |