From 375f53964b1dc6ea8ea6d7057f77b3a43c4c7eca Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 23 Nov 2009 07:21:58 +0000 Subject: minios: Fix xenbus_unwatch_path calls In a lot of places in MiniOS frontends, xenbus_watch_path_token is used instead of xenbus_watch_path to get more precise wake ups. To free those, xenbus_unwatch_path_token has to be used instead of xenbus_unwatch_path, else the unwatch operation will fail. This fixes spurious watch events left by pv-grub. Signed-Off-By: Samuel Thibault --- extras/mini-os/pcifront.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'extras/mini-os/pcifront.c') diff --git a/extras/mini-os/pcifront.c b/extras/mini-os/pcifront.c index 718abf1d73..b9be949363 100644 --- a/extras/mini-os/pcifront.c +++ b/extras/mini-os/pcifront.c @@ -246,7 +246,7 @@ done: err = xenbus_wait_for_state_change(path, &state, &dev->events); if (state != XenbusStateConnected) { printk("backend not avalable, state=%d\n", state); - xenbus_unwatch_path(XBT_NIL, path); + xenbus_unwatch_path_token(XBT_NIL, path, path); goto error; } @@ -254,7 +254,7 @@ done: if ((err = xenbus_switch_state(XBT_NIL, frontpath, XenbusStateConnected)) != NULL) { printk("error switching state %s\n", err); - xenbus_unwatch_path(XBT_NIL, path); + xenbus_unwatch_path_token(XBT_NIL, path, path); goto error; } } @@ -362,7 +362,7 @@ void shutdown_pcifront(struct pcifront_dev *dev) err = xenbus_wait_for_state_change(path, &state, &dev->events); close_pcifront: - xenbus_unwatch_path(XBT_NIL, path); + xenbus_unwatch_path_token(XBT_NIL, path, path); snprintf(path, sizeof(path), "%s/info-ref", nodename); xenbus_rm(XBT_NIL, path); -- cgit v1.2.3