]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: fix dangling reference bug 55202/head
authorZhang Song <zhangsong02@qianxin.com>
Wed, 17 Jan 2024 02:07:46 +0000 (10:07 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Wed, 17 Jan 2024 10:51:42 +0000 (10:51 +0000)
Cherry-picked from: 3fad54e1547c2e5d8b5c54cfcdc48f2a520c3292

Signed-off-by: Zhang Song <zhangsong02@qianxin.com>
src/crimson/osd/pg_backend.cc

index a3a777f848ad21c9f13c19333a5b06359c1e4854..9914a8845e4e910d4cbee2e2e5b57c1f27b8fa27 100644 (file)
@@ -807,7 +807,7 @@ PGBackend::rollback_iertr::future<> PGBackend::rollback(
   target_coid.snap = snapid;
   return obc_loader.with_clone_obc_only<RWState::RWWRITE>(
     head, target_coid,
-    [this, &os, &txn, &delta_stats, &osd_op_params, &snapid]
+    [this, &os, &txn, &delta_stats, &osd_op_params, snapid]
     (auto head_obc, auto resolved_obc) {
     if (resolved_obc->obs.oi.soid.is_head()) {
       // no-op: The resolved oid returned the head object
@@ -869,7 +869,7 @@ PGBackend::rollback_iertr::future<> PGBackend::rollback(
     // if there's no snapshot, we delete the object;
     // otherwise, do nothing.
     crimson::ct_error::enoent::handle(
-    [this, &os, &snapid, &txn, &delta_stats, &snapc, &ss, &osd_op_params] {
+    [this, &os, snapid, &txn, &delta_stats, &snapc, &ss, &osd_op_params] {
       logger().debug("PGBackend::rollback: deleting head on {}"
                      " with snap_id of {}"
                      " because got ENOENT|whiteout on obc lookup",