From c67e2541392dea1c4f283fb0196b386a2477b406 Mon Sep 17 00:00:00 2001 From: Ilya Dryomov Date: Sun, 11 Sep 2022 10:10:25 +0200 Subject: librbd: CopyupRequest can move image_extents instead of copying image_extents is already taken by rvalue reference. CopyupRequest::create() callers are prepared for the move. Signed-off-by: Ilya Dryomov --- src/librbd/io/CopyupRequest.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/librbd/io/CopyupRequest.cc b/src/librbd/io/CopyupRequest.cc index d70851409fd..c614dd5c213 100644 --- a/src/librbd/io/CopyupRequest.cc +++ b/src/librbd/io/CopyupRequest.cc @@ -118,7 +118,8 @@ template CopyupRequest::CopyupRequest(I *ictx, uint64_t objectno, Extents &&image_extents, const ZTracer::Trace &parent_trace) - : m_image_ctx(ictx), m_object_no(objectno), m_image_extents(image_extents), + : m_image_ctx(ictx), m_object_no(objectno), + m_image_extents(std::move(image_extents)), m_trace(librbd::util::create_trace(*m_image_ctx, "copy-up", parent_trace)) { ceph_assert(m_image_ctx->data_ctx.is_valid()); -- cgit v1.2.3