From 0e731e6c082d3996dc4b78a8cfa06cd0b2b57afa Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Mon, 29 Mar 2021 16:21:14 +0000 Subject: [PATCH] crimson/osd: std::move func in pg::with_*_obc(). Well, likely all the commit does is just appending a couple of extra bytes. Though, strictly juding, a func should be `std::move()`d before calling in those cases. Otherwise we can miss e.g. the `operator() &&` overload. Signed-off-by: Radoslaw Zarzynski --- src/crimson/osd/pg.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 10a7a4f5520c4..0e3200d4ff4e0 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -876,7 +876,7 @@ PG::with_head_obc(hobject_t oid, with_obc_func_t&& func) }); } return loaded.safe_then_interruptible([func = std::move(func)](auto obc) { - return func(std::move(obc)); + return std::move(func)(std::move(obc)); }); }).finally([this, pgref, obc=std::move(obc)] { logger().debug("with_head_obc: released {}", obc->get_oid()); @@ -917,7 +917,7 @@ PG::with_clone_obc(hobject_t oid, with_obc_func_t&& func) }); } return loaded.safe_then_interruptible([func = std::move(func)](auto clone) { - return func(std::move(clone)); + return std::move(func)(std::move(clone)); }); }); }); -- 2.39.5