]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: AioCompletion shouldn't hold its lock during callback
authorJason Dillaman <dillaman@redhat.com>
Thu, 30 Apr 2015 17:42:19 +0000 (13:42 -0400)
committerJason Dillaman <dillaman@redhat.com>
Tue, 28 Jul 2015 20:35:20 +0000 (16:35 -0400)
The callback routine most likely will attempt to retrieve the result
code, which will result in a recursive lock attempt.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 3ad19ae349ebb27ff6027e40883735240fa97a3c)

src/librbd/AioCompletion.cc

index d126efd040a793ac94bf2d2cda6e45431aa703f6..6222531bedac9ab669b45e6de6b7cab81e55fddf 100644 (file)
@@ -90,7 +90,9 @@ namespace librbd {
     }
 
     if (complete_cb) {
+      lock.Unlock();
       complete_cb(rbd_comp, complete_arg);
+      lock.Lock();
     }
     done = true;
     cond.Signal();