Samuel Thibault
2010-Apr-06 23:46 UTC
[Xen-devel] [PATCH] mini-os: Fix xenbus_switch_state''s transaction retry
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>
diff -r adce8bc43fcc extras/mini-os/xenbus/xenbus.c
--- a/extras/mini-os/xenbus/xenbus.c Tue Apr 06 07:16:47 2010 +0100
+++ b/extras/mini-os/xenbus/xenbus.c Wed Apr 07 01:44:16 2010 +0200
@@ -154,8 +154,10 @@ char *xenbus_switch_state(xenbus_transac
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);
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel