]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix occasional MOSDMap leak 14558/head
authorSage Weil <sage@redhat.com>
Fri, 14 Apr 2017 17:21:38 +0000 (13:21 -0400)
committerSage Weil <sage@redhat.com>
Fri, 14 Apr 2017 17:21:38 +0000 (13:21 -0400)
_committed_osd_maps() may return early (without putting
the ref) on shutdown.

Fixes: http://tracker.ceph.com/issues/18293
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc

index 7b1a021a2287f957341b13457921ba3b77f48bbd..072e94ace4865d8e15272fd69e1dabb678626f49 100644 (file)
@@ -6772,6 +6772,7 @@ struct C_OnMapCommit : public Context {
     : osd(o), first(f), last(l), msg(m) {}
   void finish(int r) override {
     osd->_committed_osd_maps(first, last, msg);
+    msg->put();
   }
 };
 
@@ -7319,7 +7320,6 @@ void OSD::_committed_osd_maps(epoch_t first, epoch_t last, MOSDMap *m)
   else if (do_restart)
     start_boot();
 
-  m->put();
 }
 
 void OSD::check_osdmap_features(ObjectStore *fs)