From daa2b54bcc334497dfa6dd5748d6762da9da3d80 Mon Sep 17 00:00:00 2001 From: NitzanMordhai Date: Sun, 24 Jul 2022 08:00:07 +0000 Subject: [PATCH] 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) --- src/osd/PGBackend.cc | 2 -- src/osd/PrimaryLogPG.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index b6357b12639a..ef2eb5381716 100644 --- a/src/osd/PGBackend.cc +++ b/src/osd/PGBackend.cc @@ -156,8 +156,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 358061acbe1c..68cdec24e38e 100644 --- a/src/osd/PrimaryLogPG.h +++ b/src/osd/PrimaryLogPG.h @@ -557,7 +557,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 { -- 2.47.3