]> git-server-git.apps.pok.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>
Thu, 4 Jun 2015 20:49:52 +0000 (16:49 -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>
src/librbd/AioCompletion.cc

index 40dbc0aa08133eb5e5963ed025e2da28c8244994..ec7f6846ffb4c476612184f984c65120a2e34e32 100644 (file)
@@ -89,7 +89,9 @@ namespace librbd {
     }
 
     if (complete_cb) {
+      lock.Unlock();
       complete_cb(rbd_comp, complete_arg);
+      lock.Lock();
     }
     done = true;
     cond.Signal();