From: Shinobu Kinjo Date: Thu, 12 Oct 2017 02:03:12 +0000 (+0900) Subject: mon/OSDMonitor: Move bufferlist before use X-Git-Tag: v13.0.1~595^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6cf668308a9d003b0b6364b824331df53c2a3ba4;p=ceph.git mon/OSDMonitor: Move bufferlist before use Signed-off-by: Shinobu Kinjo --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 43e8861864f92..5c8f00ee1b235 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -922,8 +922,6 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t) } } - bufferlist bl; - { OSDMap tmp; tmp.deepish_copy_from(osdmap); @@ -1197,6 +1195,7 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t) // encode assert(get_last_committed() + 1 == pending_inc.epoch); + bufferlist bl; ::encode(pending_inc, bl, features | CEPH_FEATURE_RESERVED); dout(20) << " full_crc " << tmp.get_crc()