xenbus: suspend correctly
PATCH 4/6 xenbus: suspend correctly
Hi,
Cleanup correctly on suspend, unregister watches.
Again needed for domU kexec, so the next kernel instance can register watches without running into -EBUSY.
cheers,
Gerd
Signature · 2 lines
Gerd Hoffmann <[email protected]> http://www.suse.de/~kraxel/julika-dora.jpeg
Signed-off-by Gerd Hoffmann <[email protected]>
drivers/xen/xenbus/xenbus_xs.c +10 -0
@@ -665,7 +665,17 @@ EXPORT_SYMBOL_GPL(unregister_xenbus_watcvoid xs_suspend (void ) { +struct xenbus_watch *watch; +char token[sizeof (watch) *2 +1 ]; +down_write (&xs_state.suspend_mutex); + +/* No need for watches_lock: the suspend_mutex is sufficient. */ +list_for_each_entry (watch, &watches, list) { +sprintf (token,"%lX" , (long )watch); +xs_unwatch (watch->node, token); + } +mutex_lock (&xs_state.request_mutex); }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel