]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix occasional MOSDMap leak 14942/head
authorSage Weil <sage@redhat.com>
Fri, 14 Apr 2017 17:21:38 +0000 (13:21 -0400)
committerShinobu Kinjo <shinobu@redhat.com>
Wed, 3 May 2017 23:07:33 +0000 (08:07 +0900)
_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>
(cherry picked from commit a74632f964e10a57fb8065aec90dc7b69bddba5b)

src/osd/OSD.cc

index 3b62ef3755b80c74bb6ef8c8ca82a6622424ea68..3c79e17483e44b2cea38ad371e2dac44674d7651 100644 (file)
@@ -6717,6 +6717,7 @@ struct C_OnMapCommit : public Context {
     : osd(o), first(f), last(l), msg(m) {}
   void finish(int r) {
     osd->_committed_osd_maps(first, last, msg);
+    msg->put();
   }
 };
 
@@ -7260,7 +7261,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)