]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd: remove canceled tasks from timer thread 7417/head
authorDouglas Fuller <dfuller@redhat.com>
Fri, 22 Jan 2016 19:18:40 +0000 (11:18 -0800)
committerLoic Dachary <ldachary@redhat.com>
Fri, 29 Jan 2016 05:23:08 +0000 (12:23 +0700)
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>
(cherry picked from commit 2aa0f318c862dbe3027d74d345671506605778eb)

src/librbd/TaskFinisher.h

index 4942a38bbdc2113f7772c1ee8763b825f8fc8810..1763c23102fd56fa1653a3c1e04ef166671c944b 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);
     }
   }