]> xenbits.xen.org Git - xenclient/kernel.git/commitdiff
imported patch CA-8806-blk-dont-reconnect-on-unplug CA-7672-blk-shutdown.patch
authort_jeang <devnull@localhost>
Tue, 6 Jan 2009 12:06:01 +0000 (12:06 +0000)
committert_jeang <devnull@localhost>
Tue, 6 Jan 2009 12:06:01 +0000 (12:06 +0000)
drivers/xen/blkback/xenbus.c
drivers/xen/blktap/xenbus.c

index 08ff8fc12df027c78a8a2b7fe3d53eb8a22b0f08..30285f493063cc59953c28e312205389eaa5e292 100644 (file)
@@ -525,7 +525,7 @@ static void frontend_changed(struct xenbus_device *dev,
                /* Ensure we connect even when two watches fire in 
                   close successsion and we miss the intermediate value 
                   of frontend_state. */
-               if (dev->state != XenbusStateConnected) {
+               if (dev->state != XenbusStateConnected && dev->state != XenbusStateClosing) {
                        err = connect_ring(be);
                        if (err)
                                break;
index d945641177c3de901c6fde4e925a1c89c0e18558..11fc8bf7a1f2d6ecad885ce3a32c7c2599c11d8e 100644 (file)
@@ -632,7 +632,7 @@ static void tap_frontend_changed(struct xenbus_device *dev,
                /* Ensure we connect even when two watches fire in 
                   close successsion and we miss the intermediate value 
                   of frontend_state. */
-               if (dev->state != XenbusStateConnected) {
+               if (dev->state != XenbusStateConnected && dev->state != XenbusStateClosing) {
                        err = connect_ring(be);
                        if (err)
                                break;