]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rwlock: assert on unlock if not locked
authorYehuda Sadeh <yehuda@inktank.com>
Tue, 15 Jul 2014 22:51:21 +0000 (15:51 -0700)
committerJohn Spray <john.spray@redhat.com>
Mon, 25 Aug 2014 00:34:00 +0000 (01:34 +0100)
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/common/RWLock.h

index bd60c417688de5866a2b2309e62037ba07c05c5e..2bffa3e7b47f3dace45bf4f909341244e91e5875 100644 (file)
@@ -54,6 +54,7 @@ public:
     if (nwlock.read() > 0) {
       nwlock.dec();
     } else {
+      assert(nrlock.read() > 0);
       nrlock.dec();
     }
     if (g_lockdep) id = lockdep_will_unlock(name, id);