Details
-
Bug
-
Resolution: Fixed
-
Critical
-
None
-
None
-
3
-
9223372036854775807
Description
sub_trans_commit_cb() can be called by in parallel, so all_committed could be set to false even if all sub transactions are committed.
static void sub_trans_commit_cb(struct lu_env *env, struct thandle *sub_th, struct dt_txn_commit_cb *cb, int err) { struct sub_thandle *st; struct top_multiple_thandle *tmt = cb->dcb_data; bool all_committed = true; ENTRY; /* Check if all sub thandles are committed */ list_for_each_entry(st, &tmt->tmt_sub_thandle_list, st_sub_list) { if (st->st_sub_th == sub_th) { st->st_committed = 1; st->st_result = err; } if (!st->st_committed) all_committed = false; } if (tmt->tmt_result == 0) tmt->tmt_result = err; if (all_committed) top_trans_committed_cb(tmt); top_multiple_thandle_dump(tmt, D_INFO); top_multiple_thandle_put(tmt); RETURN_EXIT; }