From c3a55e18a0ba2034331d758f94d915992132486d Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Thu, 9 Nov 2023 05:31:26 -0500 Subject: [PATCH] CephContext: acquire _fork_watchers_lock in notify_post_fork() The ceph::spin_unlock() seems incorrect here. Fixes: http://tracker.ceph.com/issues/63494 Signed-off-by: Venky Shankar (cherry picked from commit faef266331ae0e372a345ef1926c239aa6c3bf45) --- src/common/ceph_context.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index d26f24511d22e..68b92c45d37e2 100644 --- a/src/common/ceph_context.cc +++ b/src/common/ceph_context.cc @@ -1042,7 +1042,7 @@ void CephContext::notify_pre_fork() void CephContext::notify_post_fork() { - ceph::spin_unlock(&_fork_watchers_lock); + std::lock_guard lg(_fork_watchers_lock); for (auto &&t : _fork_watchers) t->handle_post_fork(); } -- 2.39.5