From 094b1a455c1520afa5259bbc0290d7992f450d18 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Mon, 18 May 2020 11:05:05 -0700 Subject: [PATCH] crimson: remove a few unnecessary lambda captures Signed-off-by: Samuel Just --- src/crimson/os/seastore/journal.cc | 2 +- src/crimson/osd/osd.cc | 4 ++-- src/crimson/osd/pg.cc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/crimson/os/seastore/journal.cc b/src/crimson/os/seastore/journal.cc index 6d041f7b215..1ea7fa8ddf8 100644 --- a/src/crimson/os/seastore/journal.cc +++ b/src/crimson/os/seastore/journal.cc @@ -260,7 +260,7 @@ Journal::read_record_metadata_ret Journal::read_record_metadata( return segment_manager.read( {start.segment, start.offset + (segment_off_t)block_size}, header.mdlength - block_size).safe_then( - [this, header=std::move(header), bl=std::move(bl)]( + [header=std::move(header), bl=std::move(bl)]( auto &&bptail) mutable { bl.push_back(bptail); return read_record_metadata_ret( diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index 538199ed03b..e0fd90ba4ce 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -556,7 +556,7 @@ seastar::future> OSD::make_pg(cached_map_t create_map, seastar::future> OSD::load_pg(spg_t pgid) { - return seastar::do_with(PGMeta(store.get(), pgid), [this, pgid] (auto& pg_meta) { + return seastar::do_with(PGMeta(store.get(), pgid), [] (auto& pg_meta) { return pg_meta.get_epoch(); }).then([this](epoch_t e) { return get_map(e); @@ -841,7 +841,7 @@ seastar::future> OSD::handle_pg_create_info( return shard_services.start_operation( *this, pg, pg->get_osdmap_epoch(), - osdmap->get_epoch(), std::move(rctx), true).second.then([pg] { + osdmap->get_epoch(), std::move(rctx), true).second.then([pg=pg] { return seastar::make_ready_future>(pg); }); }); diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 88a6b5b9e52..cbf7795771f 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -372,7 +372,7 @@ void PG::init( seastar::future<> PG::read_state(crimson::os::FuturizedStore* store) { - return seastar::do_with(PGMeta(store, pgid), [this, store] (auto& pg_meta) { + return seastar::do_with(PGMeta(store, pgid), [] (auto& pg_meta) { return pg_meta.load(); }).then([this, store](pg_info_t pg_info, PastIntervals past_intervals) { return peering_state.init_from_disk_state( @@ -617,7 +617,7 @@ seastar::future> PG::do_osd_ops( reply->set_enoent_reply_versions(peering_state.get_info().last_update, peering_state.get_info().last_user_version); return seastar::make_ready_future>(std::move(reply)); - })).handle_exception_type([=,&oid](const crimson::osd::error& e) { + })).handle_exception_type([=](const crimson::osd::error& e) { // we need this handler because throwing path which aren't errorated yet. logger().debug( "do_osd_ops: {} - object {} got unhandled exception {} ({})", -- 2.39.5