From: John Spray Date: Sat, 28 Jun 2014 16:43:43 +0000 (+0100) Subject: mds: avoid comparing MutationRef with 0 X-Git-Tag: v0.84~117^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fcdf2739b4833872124615fd0f7c923175e6c87e;p=ceph.git mds: avoid comparing MutationRef with 0 LLVM on OS X considers this == operator with an int ambiguous: compare with an explicit MutationRef() instead. Signed-off-by: John Spray --- diff --git a/src/mds/LocalLock.h b/src/mds/LocalLock.h index c797ea7d3a24..e12ab9a7506c 100644 --- a/src/mds/LocalLock.h +++ b/src/mds/LocalLock.h @@ -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 { diff --git a/src/mds/SimpleLock.h b/src/mds/SimpleLock.h index f96895e34c88..4ba9e8eb8e2f 100644 --- a/src/mds/SimpleLock.h +++ b/src/mds/SimpleLock.h @@ -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);