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>
This commit is contained in:
Sage Weil
2010-10-18 14:04:31 -07:00
parent 61413c2f59
commit efa4c1206e
2 changed files with 18 additions and 26 deletions

View File

@@ -400,8 +400,9 @@ static inline bool ceph_i_test(struct inode *inode, unsigned mask)
struct ceph_inode_info *ci = ceph_inode(inode);
bool r;
smp_mb();
spin_lock(&inode->i_lock);
r = (ci->i_ceph_flags & mask) == mask;
spin_unlock(&inode->i_lock);
return r;
}