]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: OpsLogFile::stop() signals under mutex
authorCasey Bodley <cbodley@redhat.com>
Mon, 25 Apr 2022 17:28:02 +0000 (13:28 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 25 Apr 2022 18:12:53 +0000 (14:12 -0400)
this shuts up ceph::debug_condition_variable's assertion that the
associated mutex is held during notify_one(). this is not strictly
required for correct use, but is a common source of bugs

Fixes: https://tracker.ceph.com/issues/55432
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_log.cc

index c09f6e5a21667aa8cefde01112b472676942045c..6f59a8d00a4f2a518c58a254c1f65ca3257b0715 100644 (file)
@@ -410,6 +410,7 @@ void OpsLogFile::start() {
 
 void OpsLogFile::stop() {
   {
+    std::unique_lock lock(log_mutex);
     cond_flush.notify_one();
     stopped = true;
   }