mirror of
https://github.com/ceph/ceph
synced 2025-02-22 02:27:29 +00:00
Merge pull request #2937 from simon3z/master
common: do not unlock rwlock on destruction Reviewed-by: Samuel Just <sjust@redhat.com> Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
77deeaa4ff
@ -46,7 +46,9 @@ public:
|
||||
return (nwlock.read() > 0);
|
||||
}
|
||||
virtual ~RWLock() {
|
||||
pthread_rwlock_unlock(&L);
|
||||
// The following check is racy but we are about to destroy
|
||||
// the object and we assume that there are no other users.
|
||||
assert(!is_locked());
|
||||
pthread_rwlock_destroy(&L);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user