From: Jason Dillaman Date: Fri, 6 Jan 2017 14:29:02 +0000 (-0500) Subject: librbd: rewatch complete callback should be invoked w/o lock X-Git-Tag: v12.0.0~225^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c253b8871312161fe905c064e5bc05a9946e8533;p=ceph.git librbd: rewatch complete callback should be invoked w/o lock It's currently being incorrectly invoked twice -- but the direct callback is holding the Watcher lock. This results in a recursive lock when ManagedLock attempts to retrieve the watch id from the Watcher. Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/Watcher.cc b/src/librbd/Watcher.cc index 44ee24651e5..6b3af958fb7 100644 --- a/src/librbd/Watcher.cc +++ b/src/librbd/Watcher.cc @@ -199,10 +199,9 @@ void Watcher::handle_rewatch(int r) { std::swap(unregister_watch_ctx, m_unregister_watch_ctx); - handle_rewatch_complete(r); m_work_queue->queue( - create_context_callback(this)); + create_context_callback(this), r); } // wake up pending unregister request