From: NitzanMordhai Date: Sun, 24 Jul 2022 08:00:07 +0000 (+0000) Subject: osd: remove invalid put on message X-Git-Tag: v17.2.6~460^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5491a53f13dfe7ce21299e2fa8b299db7d2cfc7b;p=ceph.git osd: remove invalid put on message message converted to use smart pointer, the put is extra step that causing the double put and valgrind error the regression was introduced by d4a71c3 Fixes: https://tracker.ceph.com/issues/52124 Signed-off-by: Nitzan Mordechai (cherry picked from commit c449638812daeafa89c592b9c396eaa66327f85f) --- diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index 9ae6b2c14e5c..d79dc5188096 100644 --- a/src/osd/PGBackend.cc +++ b/src/osd/PGBackend.cc @@ -157,8 +157,6 @@ void PGBackend::handle_recovery_delete(OpRequestRef op) [=](int r) { if (r != -EAGAIN) { get_parent()->send_message_osd_cluster(reply, conn.get()); - } else { - reply->put(); } })); gather.activate(); diff --git a/src/osd/PrimaryLogPG.h b/src/osd/PrimaryLogPG.h index 4a54e6ebe2cd..1a2c1149c7b7 100644 --- a/src/osd/PrimaryLogPG.h +++ b/src/osd/PrimaryLogPG.h @@ -572,7 +572,7 @@ public: } void send_message_osd_cluster( MessageRef m, Connection *con) override { - osd->send_message_osd_cluster(m, con); + osd->send_message_osd_cluster(std::move(m), con); } void send_message_osd_cluster( Message *m, const ConnectionRef& con) override {