]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: avoid comparing MutationRef with 0 2042/head
authorJohn Spray <jspray@redhat.com>
Sat, 28 Jun 2014 16:43:43 +0000 (17:43 +0100)
committerJohn Spray <jspray@redhat.com>
Mon, 30 Jun 2014 09:18:03 +0000 (10:18 +0100)
LLVM on OS X considers this == operator with an int
ambiguous: compare with an explicit MutationRef()
instead.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/LocalLock.h
src/mds/SimpleLock.h

index c797ea7d3a240e2ddd54017eb0f95064fa441f4d..e12ab9a7506cbdfb53144d99b1a5ff6051abc3a0 100644 (file)
@@ -32,7 +32,7 @@ public:
   }
 
   bool can_xlock_local() const {
-    return !is_wrlocked() && (get_xlock_by() == 0);
+    return !is_wrlocked() && (get_xlock_by() == MutationRef());
   }
 
   bool can_wrlock() const {
index f96895e34c8882b28e16d6075f52a985441eb4b0..4ba9e8eb8e2fec86e8b811d2c4406aecd638e083 100644 (file)
@@ -472,7 +472,7 @@ public:
 
   // xlock
   void get_xlock(MutationRef who, client_t client) { 
-    assert(get_xlock_by() == 0);
+    assert(get_xlock_by() == MutationRef());
     assert(state == LOCK_XLOCK || is_locallock() ||
           state == LOCK_LOCK /* if we are a slave */);
     parent->get(MDSCacheObject::PIN_LOCK);