From: Kefu Chai Date: Sun, 7 Feb 2021 06:35:50 +0000 (+0800) Subject: crimson/osd: do not add parentheses unless necessary X-Git-Tag: v17.1.0~3020^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9eca9243f4cafe642f472fa145311999fbaecd9f;p=ceph.git crimson/osd: do not add parentheses unless necessary do not use the notation of []() -> return_type { unless it helps with readability or we have to do so. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 28551eb0a264..874a8b227030 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -747,10 +747,7 @@ PG::do_osd_ops( std::move(txn), std::move(filled_osd_op_p)); }); - }).safe_then([this, - m, - obc, - rvec = op_info.allows_returnvec()]() -> PG::do_osd_ops_ertr::future> { + }).safe_then([this, m, obc, rvec = op_info.allows_returnvec()] { // TODO: should stop at the first op which returns a negative retval, // cmpext uses it for returning the index of first unmatched byte int result = m->ops.empty() ? 0 : m->ops.back().rval.code; @@ -767,12 +764,12 @@ PG::do_osd_ops( "do_osd_ops: {} - object {} sending reply", *m, obc->obs.oi.soid); - return seastar::make_ready_future>(std::move(reply)); - }, crimson::ct_error::object_corrupted::handle([m, - obc, - this] () { - return repair_object(m, obc->obs.oi.soid, obc->obs.oi.version).then([]() -> PG::do_osd_ops_ertr::future> { - return crimson::ct_error::eagain::make(); + return PG::do_osd_ops_ertr::make_ready_future>( + std::move(reply)); + }, crimson::ct_error::object_corrupted::handle([m, obc, this] { + return repair_object(m, obc->obs.oi.soid, obc->obs.oi.version).then([] { + return PG::do_osd_ops_ertr::future>( + crimson::ct_error::eagain::make()); }); }), OpsExecuter::osd_op_errorator::all_same_way([ox = std::move(ox), m,