From 6e9943ec93c4dbf9d1b63ea2cadbf6fdc7772f5a Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Tue, 30 Mar 2010 12:55:58 -0700 Subject: [PATCH] msg: fix uses of MPGStats destructor to use put() --- src/mon/PGMonitor.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index 1af1c41123d2e..bae7f073e4f0d 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -295,7 +295,7 @@ bool PGMonitor::preprocess_pg_stats(MPGStats *stats) ack->pg_stat[p->first] = p->second.reported; mon->send_reply(stats, ack); out: - delete stats; + stats->put(); return true; } @@ -306,14 +306,14 @@ bool PGMonitor::prepare_pg_stats(MPGStats *stats) if (ceph_fsid_compare(&stats->fsid, &mon->monmap->fsid)) { dout(0) << "handle_statfs on fsid " << stats->fsid << " != " << mon->monmap->fsid << dendl; - delete stats; + stats->put(); return false; } if (!stats->get_orig_source().is_osd() || !mon->osdmon()->osdmap.is_up(from) || stats->get_orig_source_inst() != mon->osdmon()->osdmap.get_inst(from)) { dout(1) << " ignoring stats from non-active osd" << dendl; - delete stats; + stats->put(); return false; } @@ -391,7 +391,7 @@ void PGMonitor::_updated_stats(MPGStats *req, MPGStatsAck *ack) { dout(7) << "_updated_stats for " << req->get_orig_source_inst() << dendl; mon->send_reply(req, ack); - delete req; + req->put(); } -- 2.39.5