]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: capture "intervals_included" by value in ReplicatedRecoveryBackend:... 39157/head
authorXuehan Xu <xxhdx1985126@gmail.com>
Fri, 29 Jan 2021 06:44:36 +0000 (14:44 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Fri, 29 Jan 2021 06:44:36 +0000 (14:44 +0800)
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 <xxhdx1985126@gmail.com>
src/crimson/osd/replicated_recovery_backend.cc

index d956e96a0fef270362a59e95f0444e31d4453e73..08aea6a4f0366a10d9f8d0a7cc5e4dc83021aa84 100644 (file)
@@ -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