aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2014-02-04 18:53:56 +0000
committerBen Hutchings <ben@decadent.org.uk>2014-04-02 00:58:50 +0100
commit93fb7adb880cf960485cfe4c599904e959890be9 (patch)
tree154cd1a86cdb0c775c9246a7d0c92adc99be798a /drivers/block
parent78f94be0386e7b4d2a871950038b66242ff662db (diff)
downloadkernel_samsung_smdk4412-93fb7adb880cf960485cfe4c599904e959890be9.zip
kernel_samsung_smdk4412-93fb7adb880cf960485cfe4c599904e959890be9.tar.gz
kernel_samsung_smdk4412-93fb7adb880cf960485cfe4c599904e959890be9.tar.bz2
xen-blkfront: handle backend CLOSED without CLOSING
commit 3661371701e714f0cea4120f6a365340858fb4e4 upstream. Backend drivers shouldn't transistion to CLOSED unless the frontend is CLOSED. If a backend does transition to CLOSED too soon then the frontend may not see the CLOSING state and will not properly shutdown. So, treat an unexpected backend CLOSED state the same as CLOSING. Signed-off-by: David Vrabel <david.vrabel@citrix.com> Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/xen-blkfront.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 7b2ec59..96b8cb7 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1281,13 +1281,16 @@ static void blkback_changed(struct xenbus_device *dev,
case XenbusStateReconfiguring:
case XenbusStateReconfigured:
case XenbusStateUnknown:
- case XenbusStateClosed:
break;
case XenbusStateConnected:
blkfront_connect(info);
break;
+ case XenbusStateClosed:
+ if (dev->state == XenbusStateClosed)
+ break;
+ /* Missed the backend's Closing state -- fallthrough */
case XenbusStateClosing:
blkfront_closing(info);
break;