From: Haomai Wang Date: Thu, 3 Dec 2015 05:47:58 +0000 (+0800) Subject: KeyValueStore: Don't queue NULL context under test purpose X-Git-Tag: v10.0.2~64^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e4218a2dfbf452b75d2a59e2b6d00f715f1d0f81;p=ceph.git KeyValueStore: Don't queue NULL context under test purpose Fix: #13961 Signed-off-by: Haomai Wang --- diff --git a/src/os/KeyValueStore.cc b/src/os/KeyValueStore.cc index 1d715222a875..9bd8f807d845 100644 --- a/src/os/KeyValueStore.cc +++ b/src/os/KeyValueStore.cc @@ -1189,8 +1189,10 @@ void KeyValueStore::_finish_op(OpSequencer *osr) if (o->onreadable_sync) { o->onreadable_sync->complete(0); } - op_finisher.queue(o->onreadable); - op_finisher.queue(to_queue); + if (o->onreadable) + op_finisher.queue(o->onreadable); + if (!to_queue.empty()) + op_finisher.queue(to_queue); delete o; }