]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix a dead lock when running fio: "RDMADispatcher::polling_stop" hold the lock and... 17016/head
authorchuanhong.wang <chuanhong.wang@163.com>
Mon, 14 Aug 2017 08:49:28 +0000 (08:49 +0000)
committerchuanhong.wang <chuanhong.wang@163.com>
Mon, 14 Aug 2017 08:49:28 +0000 (08:49 +0000)
"RDMADispatcher::polling" ending, then RDMADispatcher::polling can't hold the lock and
can't end its work.

Signed-off-by: Wang Chuanhong <chuanhong.wang@163.com>
src/msg/async/rdma/RDMAStack.cc

index dcc6e1a8fb3db0d1c7d1e7dbc4bc389873e4d5b9..7e5c9d3e9bf3716c371785e1deaa2493ce49b3d4 100644 (file)
@@ -99,8 +99,11 @@ void RDMADispatcher::polling_start()
 
 void RDMADispatcher::polling_stop()
 {
-  Mutex::Locker l(lock);
-  done = true;
+  {
+    Mutex::Locker l(lock);
+    done = true;
+  }
+
   if (!t.joinable())
     return;