]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/.../shard_services.cc: pass by reference from do_with 55684/head
authorSamuel Just <sjust@redhat.com>
Wed, 21 Feb 2024 00:43:16 +0000 (16:43 -0800)
committerSamuel Just <sjust@redhat.com>
Wed, 21 Feb 2024 00:48:58 +0000 (00:48 +0000)
Capturing the value passed by do_with by value causes later captures
by reference to be invalid past the lifetime of the lambda frame.

Fixes: https://tracker.ceph.com/issues/64513
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/shard_services.cc

index e20e310dc2cc785efa7423d11a87d787b964b976..8140ca3f91d546e90e9c8522dbb0fc27a277b7fa 100644 (file)
@@ -808,7 +808,7 @@ seastar::future<MURef<MOSDMap>> OSDSingletonState::build_incremental_map_msg(
                           crimson::make_message<MOSDMap>(
                             monc.get_fsid(),
                             osdmap->get_encoding_features()),
-                          [this, &first, FNAME, last](unsigned int map_message_max,
+                          [this, &first, FNAME, last](auto &map_message_max,
                                                       auto &m) {
     m->cluster_osdmap_trim_lower_bound = superblock.cluster_osdmap_trim_lower_bound;
     m->newest_map = superblock.get_newest_map();