From: Samuel Thibault Subject: [PATCH] mini-os: Fix xenbus_switch_state's transaction retry Date: Wed, 7 Apr 2010 01:46:03 +0200 Message-ID: <20100406234603.GB4023@const.famille.thibault.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org 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 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);