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/blkfront.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'extras/mini-os/blkfront.c') diff --git a/extras/mini-os/blkfront.c b/extras/mini-os/blkfront.c index a451e98f02..2d4f03b1a5 100644 --- a/extras/mini-os/blkfront.c +++ b/extras/mini-os/blkfront.c @@ -208,7 +208,7 @@ done: msg = xenbus_wait_for_state_change(path, &state, &dev->events); if (msg != NULL || state != XenbusStateConnected) { printk("backend not available, state=%d\n", state); - xenbus_unwatch_path(XBT_NIL, path); + xenbus_unwatch_path_token(XBT_NIL, path, path); goto error; } @@ -286,7 +286,7 @@ void shutdown_blkfront(struct blkfront_dev *dev) err = xenbus_wait_for_state_change(path, &state, &dev->events); close: - xenbus_unwatch_path(XBT_NIL, path); + xenbus_unwatch_path_token(XBT_NIL, path, path); snprintf(path, sizeof(path), "%s/ring-ref", nodename); xenbus_rm(XBT_NIL, path); -- cgit v1.2.3