]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/os/seastore/record_scanner: replace [=] capturing
authorYingxin Cheng <yingxin.cheng@intel.com>
Mon, 13 May 2024 07:14:40 +0000 (15:14 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 13 Jun 2024 12:19:44 +0000 (15:19 +0300)
Capturing with = is error prone and causes compile warning.

And it is wrong:
* cursor should be captured by reference
* mutable keyword is unnecessary

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
(cherry picked from commit 116c5b4894193124cde485091b9627ccf3cf73a0)

src/crimson/os/seastore/record_scanner.cc

index 77f7cb422acf67b56966e29b7647832703114a4e..5fab11505cef61d880336199d14384f468d03f3b 100644 (file)
@@ -120,7 +120,7 @@ RecordScanner::read_validate_record_metadata(
   }
   TRACE("reading record group header block {}~4096", start);
   return read(start, block_size
-  ).safe_then([=](bufferptr bptr) mutable
+  ).safe_then([this, FNAME, nonce, block_size, &cursor](bufferptr bptr)
               -> read_validate_record_metadata_ret {
     bufferlist bl;
     bl.append(bptr);