diff options
author | Sage Weil <sage@newdream.net> | 2010-10-18 17:04:31 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-10-20 18:38:27 -0400 |
commit | efa4c1206eaff047c474af2136748a58eb8cc33b (patch) | |
tree | 61f8957ed7735c01a6d6900a3c4c2c45d084c3a7 /fs/ceph/super.h | |
parent | 61413c2f594e6b63db2b14c70c2e7d8cf02f9c00 (diff) |
ceph: do not carry i_lock for readdir from dcache
We were taking dcache_lock inside of i_lock, which introduces a dependency
not found elsewhere in the kernel, complicationg the vfs locking
scalability work. Since we don't actually need it here anyway, remove
it.
We only need i_lock to test for the I_COMPLETE flag, so be careful to do
so without dcache_lock held.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index e2e904442ce2..1886294e12f7 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -400,8 +400,9 @@ static inline bool ceph_i_test(struct inode *inode, unsigned mask) | |||
400 | struct ceph_inode_info *ci = ceph_inode(inode); | 400 | struct ceph_inode_info *ci = ceph_inode(inode); |
401 | bool r; | 401 | bool r; |
402 | 402 | ||
403 | smp_mb(); | 403 | spin_lock(&inode->i_lock); |
404 | r = (ci->i_ceph_flags & mask) == mask; | 404 | r = (ci->i_ceph_flags & mask) == mask; |
405 | spin_unlock(&inode->i_lock); | ||
405 | return r; | 406 | return r; |
406 | } | 407 | } |
407 | 408 | ||