]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add a small efficiency 29178/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Mon, 22 Jul 2019 19:27:03 +0000 (15:27 -0400)
committerJ. Eric Ivancich <ivancich@redhat.com>
Mon, 22 Jul 2019 19:27:03 +0000 (15:27 -0400)
In a specific lambda, capture a data structure by reference rather
than by copy.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
src/rgw/rgw_rados.cc

index 556aeda9503f656a7d25b531b75283a1d0f87b39..f44ca59e16bea12dcd6fcd369f153f7b336e0ad7 100644 (file)
@@ -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) {