]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: use smp_mb in place of spinlock for testing flag bit
authorSage Weil <sage@newdream.net>
Thu, 1 Oct 2009 18:21:54 +0000 (11:21 -0700)
committerSage Weil <sage@newdream.net>
Thu, 1 Oct 2009 18:21:54 +0000 (11:21 -0700)
src/kernel/super.h

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