]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: remove canceled tasks from timer thread 7329/head
authorDouglas Fuller <dfuller@redhat.com>
Fri, 22 Jan 2016 19:18:40 +0000 (11:18 -0800)
committerDouglas Fuller <dfuller@redhat.com>
Fri, 22 Jan 2016 19:23:45 +0000 (11:23 -0800)
When canceling scheduled tasks using the timer thread, TaskFinisher::cancel
does not call SafeTimer::cancel_event, so events fire anyway. Add this call.

Fixes: #14476
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
src/librbd/TaskFinisher.h

index 43ec51796c5e83598725863c35f6e400aefbeef5..201ff01380c775ac9d400208e3b7023d48274949 100644 (file)
@@ -45,6 +45,7 @@ public:
     typename TaskContexts::iterator it = m_task_contexts.find(task);
     if (it != m_task_contexts.end()) {
       delete it->second.first;
+      m_safe_timer->cancel_event(it->second.second);
       m_task_contexts.erase(it);
     }
   }