From: xiexingguo <258156334@qq.com> Date: Wed, 2 Dec 2015 06:50:08 +0000 (+0800) Subject: OSD: fix wrongly placed assert X-Git-Tag: v10.0.3~192^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bef3cae33af0c457bf946f628fd683d1492981c8;p=ceph.git OSD: fix wrongly placed assert It's too late to catch this fatal error. Signed-off-by: xie xingguo --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index c2267efe7c21..25a170576aad 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -7472,12 +7472,12 @@ void OSD::handle_pg_trim(OpRequestRef op) dout(10) << " don't have pg " << m->pgid << dendl; } else { PG *pg = _lookup_lock_pg(m->pgid); + assert(pg); if (m->epoch < pg->info.history.same_interval_since) { dout(10) << *pg << " got old trim to " << m->trim_to << ", ignoring" << dendl; pg->unlock(); return; } - assert(pg); if (pg->is_primary()) { // peer is informing us of their last_complete_ondisk