mirror of
https://github.com/ceph/ceph
synced 2025-03-09 17:59:10 +00:00
workqueue: reset heartbeat timeout under lock
This makes coverity happier: CID 727967: Value not atomically updated (ATOMICITY) At (44): Using an unreliable value of "hb" inside the second locked section. If the data that "hb" depends on was changed by another thread, this use might be incorrect. Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
bdadc4eca6
commit
73d854975e
@ -107,8 +107,8 @@ void ThreadPool::worker(WorkThread *wt)
|
||||
if (item) {
|
||||
processing++;
|
||||
ldout(cct,12) << "worker wq " << wq->name << " start processing " << item << dendl;
|
||||
_lock.Unlock();
|
||||
cct->get_heartbeat_map()->reset_timeout(hb, wq->timeout_interval, wq->suicide_interval);
|
||||
_lock.Unlock();
|
||||
wq->_void_process(item);
|
||||
_lock.Lock();
|
||||
wq->_void_process_finish(item);
|
||||
|
Loading…
Reference in New Issue
Block a user