]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/WorkQueue: narrow ThreadPool::_lock in func worker. 22411/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Mon, 11 Feb 2019 03:05:46 +0000 (11:05 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Sat, 13 Apr 2019 04:47:40 +0000 (12:47 +0800)
In fact, heartbeat_handle_d is a local paramter and don't protect by
ThreadPool::_lock.

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/common/WorkQueue.cc

index ba7579002553630ef39aef042596b7c1ea9d2a2e..93b2aadd8a887f495650d6e34fac99923b3a6561 100644 (file)
@@ -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);