From: Jianpeng Ma Date: Mon, 11 Feb 2019 03:05:46 +0000 (+0800) Subject: common/WorkQueue: narrow ThreadPool::_lock in func worker. X-Git-Tag: v15.1.0~2811^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e15261c9216c8e55ef12a2e8904094b46d857da3;p=ceph.git 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 --- 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);