From 30b3b35128c34cf2ff4759f5ab784ba9a51f54e6 Mon Sep 17 00:00:00 2001 From: Dongsheng Yang Date: Thu, 14 Apr 2016 18:35:58 +0800 Subject: [PATCH] KStore: change the return type of _txc_finalize to void Signed-off-by: Dongsheng Yang --- src/os/kstore/KStore.cc | 8 ++------ src/os/kstore/KStore.h | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/os/kstore/KStore.cc b/src/os/kstore/KStore.cc index 0dba494f48d1f..5757109f413b0 100644 --- a/src/os/kstore/KStore.cc +++ b/src/os/kstore/KStore.cc @@ -2219,7 +2219,7 @@ void KStore::_txc_state_proc(TransContext *txc) } } -int KStore::_txc_finalize(OpSequencer *osr, TransContext *txc) +void KStore::_txc_finalize(OpSequencer *osr, TransContext *txc) { dout(20) << __func__ << " osr " << osr << " txc " << txc << " onodes " << txc->onodes << dendl; @@ -2236,8 +2236,6 @@ int KStore::_txc_finalize(OpSequencer *osr, TransContext *txc) std::lock_guard l((*p)->flush_lock); (*p)->flush_txns.insert(txc); } - - return 0; } void KStore::_txc_finish_kv(TransContext *txc) @@ -2392,7 +2390,6 @@ int KStore::queue_transactions( Context *onreadable_sync; ObjectStore::Transaction::collect_contexts( tls, &onreadable, &ondisk, &onreadable_sync); - int r; // set up the sequencer OpSequencer *osr; @@ -2420,8 +2417,7 @@ int KStore::queue_transactions( _txc_add_transaction(txc, &(*p)); } - r = _txc_finalize(osr, txc); - assert(r == 0); + _txc_finalize(osr, txc); throttle_ops.get(txc->ops); throttle_bytes.get(txc->bytes); diff --git a/src/os/kstore/KStore.h b/src/os/kstore/KStore.h index 09483de46be6d..ad1300343c4d6 100644 --- a/src/os/kstore/KStore.h +++ b/src/os/kstore/KStore.h @@ -366,7 +366,7 @@ private: TransContext *_txc_create(OpSequencer *osr); void _txc_release(TransContext *txc, uint64_t offset, uint64_t length); void _txc_add_transaction(TransContext *txc, Transaction *t); - int _txc_finalize(OpSequencer *osr, TransContext *txc); + void _txc_finalize(OpSequencer *osr, TransContext *txc); void _txc_state_proc(TransContext *txc); void _txc_finish_kv(TransContext *txc); void _txc_finish(TransContext *txc); -- 2.39.5