]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: fix wrongly placed assert
authorxiexingguo <258156334@qq.com>
Wed, 2 Dec 2015 06:50:08 +0000 (14:50 +0800)
committerxiexingguo <258156334@qq.com>
Wed, 2 Dec 2015 06:50:08 +0000 (14:50 +0800)
It's too late to catch this fatal error.
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/OSD.cc

index c2267efe7c210d6fe85c2fe18ab6e48c0b7ed228..25a170576aad21b0654db4aed06b5c4fd0b8090f 100644 (file)
@@ -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