Fixes: #9845
Reviewed-by: Sage Weil <sage@redhat.com>
Signed-off-by: David Zafman <dzafman@redhat.com>
{
assert(initialized.read());
- RWLock::WLocker wl(rwlock);
+ rwlock.get_write();
initialized.set(0);
logger = NULL;
}
+ // Let go of Objecter write lock so timer thread can shutdown
+ rwlock.unlock();
+
{
Mutex::Locker l(timer_lock);
timer.shutdown();
ldout(cct, 10) << "tick" << dendl;
- // we are only called by C_Tick
- assert(tick_event);
- tick_event = NULL;
-
if (!initialized.read()) {
// we raced with shutdown
return;
}
+ // we are only called by C_Tick
+ assert(tick_event);
+ tick_event = NULL;
+
set<OSDSession*> toping;
int r = 0;