From: Casey Bodley Date: Mon, 25 Apr 2022 17:28:02 +0000 (-0400) Subject: rgw: OpsLogFile::stop() signals under mutex X-Git-Tag: v16.2.11~517^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a90bffb8104ff92573399458127fb065f7923a3d;p=ceph.git rgw: OpsLogFile::stop() signals under mutex 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 (cherry picked from commit cf6f99e67a6dbbc4e39d9e1fda32356c18051f5a) --- diff --git a/src/rgw/rgw_log.cc b/src/rgw/rgw_log.cc index 5876b1789bff..8d53909eacad 100644 --- a/src/rgw/rgw_log.cc +++ b/src/rgw/rgw_log.cc @@ -398,6 +398,7 @@ void OpsLogFile::start() { void OpsLogFile::stop() { { + std::unique_lock lock(log_mutex); cond_flush.notify_one(); stopped = true; }