From: J. Eric Ivancich Date: Mon, 22 Jul 2019 19:27:03 +0000 (-0400) Subject: rgw: add a small efficiency X-Git-Tag: v15.1.0~1987^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5346875306d6104f0864409a6f5eeb69ed44a6ea;p=ceph.git rgw: add a small efficiency In a specific lambda, capture a data structure by reference rather than by copy. Signed-off-by: J. Eric Ivancich --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 556aeda9503f..f44ca59e16be 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -7134,8 +7134,8 @@ int RGWRados::block_while_resharding(RGWRados::BucketShard *bs, // new_bucket_id and returns 0, otherwise it returns a negative // error code auto fetch_new_bucket_id = - [this, bucket_info](const std::string& log_tag, - std::string* new_bucket_id) -> int { + [this, &bucket_info](const std::string& log_tag, + std::string* new_bucket_id) -> int { RGWBucketInfo fresh_bucket_info = bucket_info; int ret = try_refresh_bucket_info(fresh_bucket_info, nullptr); if (ret < 0) {