diff options
author | Zhang Song <zhangsong02@qianxin.com> | 2024-01-17 03:07:46 +0100 |
---|---|---|
committer | Matan Breizman <mbreizma@redhat.com> | 2024-01-17 11:51:42 +0100 |
commit | 3ae10a22cab6e79edf020d102c9d95812b422cf0 (patch) | |
tree | a79e95bdd09a7a7952ac12645fbafff467aaae5c | |
parent | crimson/osd: get SnapSetContext from head_obc (diff) | |
download | ceph-3ae10a22cab6e79edf020d102c9d95812b422cf0.tar.xz ceph-3ae10a22cab6e79edf020d102c9d95812b422cf0.zip |
crimson/osd: fix dangling reference bug
Cherry-picked from: 3fad54e1547c2e5d8b5c54cfcdc48f2a520c3292
Signed-off-by: Zhang Song <zhangsong02@qianxin.com>
-rw-r--r-- | src/crimson/osd/pg_backend.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crimson/osd/pg_backend.cc b/src/crimson/osd/pg_backend.cc index a3a777f848a..9914a8845e4 100644 --- a/src/crimson/osd/pg_backend.cc +++ b/src/crimson/osd/pg_backend.cc @@ -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", |