]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
neorados: NotifierHandler holds intrusive_ptr<LingerOp>
authorCasey Bodley <cbodley@redhat.com>
Thu, 11 Dec 2025 19:16:45 +0000 (14:16 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 16 Dec 2025 15:55:32 +0000 (10:55 -0500)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/neorados/RADOS.cc

index cea79e2fb012e70a15ab37240bb863963b45386f..7c3ca744ad73a0a49796389e2cf0082d41b1b349 100644 (file)
@@ -1658,7 +1658,7 @@ struct NotifyHandler : std::enable_shared_from_this<NotifyHandler> {
   asio::io_context& ioc;
   asio::strand<asio::io_context::executor_type> strand;
   Objecter* objecter;
-  Objecter::LingerOp* op;
+  boost::intrusive_ptr<Objecter::LingerOp> op;
   RADOS::NotifyComp c;
 
   bool acked = false;
@@ -1668,10 +1668,10 @@ struct NotifyHandler : std::enable_shared_from_this<NotifyHandler> {
 
   NotifyHandler(asio::io_context& ioc,
                Objecter* objecter,
-               Objecter::LingerOp* op,
+               boost::intrusive_ptr<Objecter::LingerOp> op,
                RADOS::NotifyComp c)
     : ioc(ioc), strand(asio::make_strand(ioc)),
-      objecter(objecter), op(op), c(std::move(c)) {}
+      objecter(objecter), op(std::move(op)), c(std::move(c)) {}
 
   // Use bind or a lambda to pass this in.
   void handle_ack(bs::error_code ec,
@@ -1702,7 +1702,7 @@ struct NotifyHandler : std::enable_shared_from_this<NotifyHandler> {
     if (!res && ec)
       res = ec;
     if ((acked && finished) || res) {
-      objecter->linger_cancel(op);
+      objecter->linger_cancel(op.get());
       ceph_assert(c);
       bc::flat_map<std::pair<uint64_t, uint64_t>, buffer::list> reply_map;
       bc::flat_set<std::pair<uint64_t, uint64_t>> missed_set;