From 575d9148c0a20f0ad14dbbb35e0ab6149e719379 Mon Sep 17 00:00:00 2001 From: Ronen Friedman Date: Wed, 25 Oct 2023 02:24:18 -0500 Subject: [PATCH] osd: fix use-after-move in build_incremental_map_msg() Fixes: https://tracker.ceph.com/issues/63310 Backport of https://github.com/ceph/ceph/pull/54177 Signed-off-by: Ronen Friedman (cherry picked from commit 9e2b8b0e8235b36e55310aab49b8f760e8d57cad) --- src/osd/OSD.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index b6dc2a2b8b22e..db8d86ab3a539 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -1420,14 +1420,14 @@ MOSDMap *OSDService::build_incremental_map_msg(epoch_t since, epoch_t to, for (epoch_t e = since + 1; e <= to; ++e) { bufferlist bl; if (get_inc_map_bl(e, bl)) { - m->incremental_maps[e] = std::move(bl); + m->incremental_maps[e] = bl; } else { dout(10) << __func__ << " missing incremental map " << e << dendl; if (!get_map_bl(e, bl)) { derr << __func__ << " also missing full map " << e << dendl; goto panic; } - m->maps[e] = std::move(bl); + m->maps[e] = bl; } max--; max_bytes -= bl.length(); -- 2.39.5