tstellar / rpms / ceph

Forked from rpms/ceph 3 years ago
Clone
cba5e95
From 149481ac6dc52a852fb53800384a99e3d69ad11a Mon Sep 17 00:00:00 2001
651026b
From: Boris Ranto <branto@redhat.com>
651026b
Date: Mon, 8 Dec 2014 08:36:37 +0100
cba5e95
Subject: [PATCH 3/3] Backport pull request #2937 to firefly
651026b
651026b
---
651026b
 src/common/RWLock.h | 4 +++-
651026b
 1 file changed, 3 insertions(+), 1 deletion(-)
651026b
651026b
diff --git a/src/common/RWLock.h b/src/common/RWLock.h
cba5e95
index f901ac0..f4d1937 100644
651026b
--- a/src/common/RWLock.h
651026b
+++ b/src/common/RWLock.h
651026b
@@ -36,7 +36,9 @@ public:
651026b
   }
651026b
 
651026b
   virtual ~RWLock() {
651026b
-    pthread_rwlock_unlock(&L);
651026b
+    // The following check is racy but we are about to destroy
651026b
+    // the object and we assume that there are no other users.
615188d
+    //assert(!is_locked()); -- hacky backport, no is_locked in firefly
651026b
     pthread_rwlock_destroy(&L);
651026b
   }
651026b
 
651026b
-- 
cba5e95
1.9.3
651026b