From 5ba2b2c01793a57879beb7f88d8c3d92e40550cb Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Thu, 2 Jan 2020 13:31:48 +0100 Subject: [PATCH] crimson/osd: fix the lifetime management of OpsExecuter. Signed-off-by: Radoslaw Zarzynski --- src/crimson/osd/pg.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 0dc06f561d0..40fbc948dc2 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -525,7 +525,7 @@ seastar::future> PG::do_osd_ops( obc->obs.oi.soid, ceph_osd_op_name(osd_op.op.op)); return ox->execute_osd_op(osd_op); - }).safe_then([this, obc, m, ox = std::move(ox)] { + }).safe_then([this, obc, m, ox = ox.get()] { logger().debug( "do_osd_ops: {} - object {} all operations successful", *m, @@ -547,7 +547,7 @@ seastar::future> PG::do_osd_ops( return submit_transaction(std::move(obc), std::move(txn), *m); } }); - }).safe_then([m, obc, this] { + }).safe_then([m, obc, this, ox_deleter = std::move(ox)] { auto reply = make_message(m.get(), 0, get_osdmap_epoch(), 0, false); reply->add_flags(CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK); -- 2.47.3