]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: use PGRef in handle_pg_remove
authorSamuel Just <sam.just@inktank.com>
Fri, 19 Apr 2013 00:55:25 +0000 (17:55 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 19 Apr 2013 18:00:21 +0000 (11:00 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/OSD.cc

index e3dc2e358bbdec0195acd1f95e7f0624d8fc35eb..c61ad0b2d627a5dad3dd6db532ab2931244cc7cb 100644 (file)
@@ -5788,10 +5788,9 @@ void OSD::handle_pg_remove(OpRequestRef op)
                       up, acting);
     if (history.same_interval_since <= m->get_epoch()) {
       assert(pg->get_primary() == m->get_source().num());
-      pg->get();
+      PGRef _pg(pg);
       _remove_pg(pg);
       pg->unlock();
-      pg->put();
     } else {
       dout(10) << *pg << " ignoring remove request, pg changed in epoch "
               << history.same_interval_since