From e1f8b585bdcf05b81696130eda87daa72f1ecd11 Mon Sep 17 00:00:00 2001 From: Xuehan Xu Date: Fri, 29 Jan 2021 14:44:36 +0800 Subject: [PATCH] crimson/osd: capture "intervals_included" by value in ReplicatedRecoveryBackend::submit_push_data ReplicatedRecoveryBackend::submit_push_data()'s parameter "intervals_included" might be an local varaiable in the outer method, so we should capture it by value to avoid a dangling reference in the inner lambda Signed-off-by: Xuehan Xu --- src/crimson/osd/replicated_recovery_backend.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crimson/osd/replicated_recovery_backend.cc b/src/crimson/osd/replicated_recovery_backend.cc index d956e96a0fef2..08aea6a4f0366 100644 --- a/src/crimson/osd/replicated_recovery_backend.cc +++ b/src/crimson/osd/replicated_recovery_backend.cc @@ -980,7 +980,7 @@ seastar::future<> ReplicatedRecoveryBackend::submit_push_data( } return seastar::make_ready_future<>(); }().then([this, data_zeros=std::move(data_zeros), - &recovery_info, &intervals_included, t, target_oid, + &recovery_info, intervals_included, t, target_oid, &omap_entries, &attrs, data_included, complete, first]() mutable { uint32_t fadvise_flags = CEPH_OSD_OP_FLAG_FADVISE_SEQUENTIAL; // Punch zeros for data, if fiemap indicates nothing but it is marked dirty -- 2.39.5