]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: avoid refcount mutations
authorMatan Breizman <mbreizma@redhat.com>
Wed, 15 Nov 2023 14:27:05 +0000 (14:27 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Sun, 19 Nov 2023 12:41:16 +0000 (12:41 +0000)
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
src/crimson/osd/osd_operations/logmissing_request.cc
src/crimson/osd/osd_operations/logmissing_request_reply.cc
src/crimson/osd/osd_operations/snaptrim_event.cc
src/crimson/osd/pg.cc

index 797625da629ad97eb81e2ffffe731417ce3a87aa..5f92ccddfcdc2f879b634195e4267e4cf14daf12 100644 (file)
@@ -88,7 +88,7 @@ seastar::future<> LogMissingRequest::with_pg(
     });
   }, [](std::exception_ptr) {
     return seastar::now();
-  }, pg).finally([this, ref] {
+  }, pg).finally([this, ref=std::move(ref)] {
     logger().debug("{}: exit", *this);
     handle.exit();
   });
index b2d447d194afa53b3122f172548d46b24e55ac72..20a9bf7dd00e62e666696a3649a758d44c8e8ead 100644 (file)
@@ -74,7 +74,7 @@ seastar::future<> LogMissingRequestReply::with_pg(
     });
   }, [](std::exception_ptr) {
     return seastar::now();
-  }, pg).finally([this, ref] {
+  }, pg).finally([this, ref=std::move(ref)] {
     logger().debug("{}: exit", *this);
     handle.exit();
   });
index b0f5a452e7fc8b60d12d1b9d70dfcaba5ed4468e..f76dd1e36f238d2d6b7361e75d25cf3e79d07fc9 100644 (file)
@@ -196,7 +196,7 @@ SnapTrimEvent::start()
   }, [this](std::exception_ptr eptr) -> snap_trim_ertr::future<seastar::stop_iteration> {
     logger().debug("{}: interrupted {}", *this, eptr);
     return crimson::ct_error::eagain::make();
-  }, pg).finally([this, ref] {
+  }, pg).finally([this, ref=std::move(ref)] {
     logger().debug("{}: exit", *this);
     handle.exit();
   });
index 78ae559e8cd5663a22b7f9512e2f60258677d9c3..c4dce8a8ee305df5ac31fd445b329a6252600666 100644 (file)
@@ -507,7 +507,7 @@ void PG::on_active_actmap()
         logger().debug("{}: trimmed snap={}", *this, trimmed);
       });
     }
-  ).finally([this, pg_ref] {
+  ).finally([this, pg_ref=std::move(pg_ref)] {
     logger().debug("{}: PG::on_active_actmap() finished trimming",
                    *this);
     peering_state.state_clear(PG_STATE_SNAPTRIM);