From a74632f964e10a57fb8065aec90dc7b69bddba5b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 14 Apr 2017 13:21:38 -0400 Subject: [PATCH] osd: fix occasional MOSDMap leak _committed_osd_maps() may return early (without putting the ref) on shutdown. Fixes: http://tracker.ceph.com/issues/18293 Signed-off-by: Sage Weil --- src/osd/OSD.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 7b1a021a228..072e94ace48 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -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) -- 2.47.3