mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
mini-os: Fix xenbus_switch_state's transaction retry
When xenbus_switch_state has to retry the transaction which it just created, it needs to recreate another one. Clearing xbt triggers it. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
1 parent
15d5739ea9
commit
cdabe14bff
1 file changed
+3
-1
@@ -154,8 +154,10 @@ char *xenbus_switch_state(xenbus_transaction_t xbt, const char* path, XenbusStat
|
||||
msg = xenbus_write(xbt, path, value);
|
||||
|
||||
exit:
|
||||
if (xbt_flag)
|
||||
if (xbt_flag) {
|
||||
msg2 = xenbus_transaction_end(xbt, 0, &retry);
|
||||
xbt = XBT_NIL;
|
||||
}
|
||||
if (msg == NULL && msg2 != NULL)
|
||||
msg = msg2;
|
||||
} while (retry);
|
||||
|
||||