From e15261c9216c8e55ef12a2e8904094b46d857da3 Mon Sep 17 00:00:00 2001 From: Jianpeng Ma Date: Mon, 11 Feb 2019 11:05:46 +0800 Subject: [PATCH] common/WorkQueue: narrow ThreadPool::_lock in func worker. In fact, heartbeat_handle_d is a local paramter and don't protect by ThreadPool::_lock. Signed-off-by: Jianpeng Ma --- src/common/WorkQueue.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/WorkQueue.cc b/src/common/WorkQueue.cc index ba757900255..93b2aadd8a8 100644 --- a/src/common/WorkQueue.cc +++ b/src/common/WorkQueue.cc @@ -112,9 +112,9 @@ void ThreadPool::worker(WorkThread *wt) processing++; ldout(cct,12) << "worker wq " << wq->name << " start processing " << item << " (" << processing << " active)" << dendl; + ul.unlock(); TPHandle tp_handle(cct, hb, wq->timeout_interval, wq->suicide_interval); tp_handle.reset_tp_timeout(); - ul.unlock(); wq->_void_process(item, tp_handle); ul.lock(); wq->_void_process_finish(item); -- 2.47.3