diff options
author | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:50:06 -0500 |
---|---|---|
committer | Nick Piggin <npiggin@kernel.dk> | 2011-01-07 01:50:31 -0500 |
commit | 873feea09ebc980cbd3631b767356ce1eee65ec1 (patch) | |
tree | 59a8fce9b138086abee7cf845f62ff70a390cf81 /fs/9p/vfs_inode.c | |
parent | ceb5bdc2d246f6d81cf61ed70f325308a11821d2 (diff) |
fs: dcache per-inode inode alias locking
dcache_inode_lock can be replaced with per-inode locking. Use existing
inode->i_lock for this. This is slightly non-trivial because we sometimes
need to find the inode from the dentry, which requires d_inode to be
stabilised (either with refcount or d_lock).
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Diffstat (limited to 'fs/9p/vfs_inode.c')
-rw-r--r-- | fs/9p/vfs_inode.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index df8bbb358d5..59782981b22 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -277,11 +277,11 @@ static struct dentry *v9fs_dentry_from_dir_inode(struct inode *inode) | |||
277 | { | 277 | { |
278 | struct dentry *dentry; | 278 | struct dentry *dentry; |
279 | 279 | ||
280 | spin_lock(&dcache_inode_lock); | 280 | spin_lock(&inode->i_lock); |
281 | /* Directory should have only one entry. */ | 281 | /* Directory should have only one entry. */ |
282 | BUG_ON(S_ISDIR(inode->i_mode) && !list_is_singular(&inode->i_dentry)); | 282 | BUG_ON(S_ISDIR(inode->i_mode) && !list_is_singular(&inode->i_dentry)); |
283 | dentry = list_entry(inode->i_dentry.next, struct dentry, d_alias); | 283 | dentry = list_entry(inode->i_dentry.next, struct dentry, d_alias); |
284 | spin_unlock(&dcache_inode_lock); | 284 | spin_unlock(&inode->i_lock); |
285 | return dentry; | 285 | return dentry; |
286 | } | 286 | } |
287 | 287 | ||