From: Jie Wang Date: Thu, 17 Nov 2016 07:34:26 +0000 (+0000) Subject: osd/OSD: small cleanup. curmap will be assigned inside the following loops. X-Git-Tag: v11.1.0~186^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=253649f20cf5a701a7bde5addedce13110e57400;p=ceph.git osd/OSD: small cleanup. curmap will be assigned inside the following loops. Signed-off-by: Jie Wang --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 97025576026a..d805a03e930c 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -9030,7 +9030,7 @@ void OSD::process_peering_events( { bool need_up_thru = false; epoch_t same_interval_since = 0; - OSDMapRef curmap = service.get_osdmap(); + OSDMapRef curmap; PG::RecoveryCtx rctx = create_context(); rctx.handle = &handle; for (list::const_iterator i = pgs.begin(); diff --git a/src/osd/OSD.h b/src/osd/OSD.h index a79aa161b88c..960013f7fdff 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1944,6 +1944,7 @@ private: void _process( const list &pgs, ThreadPool::TPHandle &handle) override { + assert(!pgs.empty()); osd->process_peering_events(pgs, handle); for (list::const_iterator i = pgs.begin(); i != pgs.end();