]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
CephContext: acquire _fork_watchers_lock in notify_post_fork() 59266/head
authorVenky Shankar <vshankar@redhat.com>
Thu, 9 Nov 2023 10:31:26 +0000 (05:31 -0500)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Sat, 11 Jan 2025 07:16:55 +0000 (14:16 +0700)
The ceph::spin_unlock() seems incorrect here.

Fixes: http://tracker.ceph.com/issues/63494
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit faef266331ae0e372a345ef1926c239aa6c3bf45)

src/common/ceph_context.cc

index d26f24511d22e22062f224beb9fb133c486ca3de..68b92c45d37e2e4112a117f80f21f11b712f8509 100644 (file)
@@ -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();
 }