2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-22 09:58:01 +00:00

ovsdb: transaction: Remove incorrect transaction abort in pre-commit.

Pre-commit must not abort the transaction, otherwise the upper layers
may crash accessing it.  E.g. ovsdb_trigger_try() checks the state of
the transaction after trying to commit it.

This particular failure can't actually happen, because the function
determine_changes() can't fail.  However, the code is still wrong and
a bit misleading, so should be fixed.

Fixes: 53178986d7fc ("ovsdb: Add support for online schema conversion.")
Acked-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Ilya Maximets 2024-07-22 17:21:24 +02:00
parent 8f3d6c145b
commit a5023d597c

View File

@ -1090,7 +1090,6 @@ ovsdb_txn_precommit(struct ovsdb_txn *txn)
* was really a no-op. */
error = for_each_txn_row(txn, determine_changes);
if (error) {
ovsdb_txn_abort(txn);
return OVSDB_WRAP_BUG("can't happen", error);
}
if (ovs_list_is_empty(&txn->txn_tables)) {