From c3a4c9b440f8974af0f165b7c48f4b7423530ee7 Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Thu, 27 Feb 2025 10:12:20 +0000 Subject: [PATCH] Revert: "crimson/osd/ops_executer: prevent access to null pointers caused by gcc bug" This reverts commit b5665cfac472edefbf45a16f726663c6709a68a9. Signed-off-by: Matan Breizman --- src/crimson/osd/ops_executer.cc | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/crimson/osd/ops_executer.cc b/src/crimson/osd/ops_executer.cc index 32b2cbcb940..991c16d7aae 100644 --- a/src/crimson/osd/ops_executer.cc +++ b/src/crimson/osd/ops_executer.cc @@ -867,19 +867,9 @@ OpsExecuter::flush_changes_and_submit( if (auto log_rit = log_entries.rbegin(); log_rit != log_entries.rend()) { ceph_assert(log_rit->version == osd_op_params->at_version); } - - /* - * This works around the gcc bug causing the generated code to incorrectly - * execute unconditionally before the predicate. - * - * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101244 - */ - auto clone_obc = cloning_ctx - ? std::move(cloning_ctx->clone_obc) - : nullptr; auto [_submitted, _all_completed] = co_await pg->submit_transaction( std::move(obc), - std::move(clone_obc), + cloning_ctx ? std::move(cloning_ctx->clone_obc) : nullptr, std::move(txn), std::move(*osd_op_params), std::move(log_entries) -- 2.39.5