diff options
-rw-r--r-- | drivers/block/xen-blkfront.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 8f905089b72b..6971a12e8b9b 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -977,8 +977,10 @@ static void backend_changed(struct xenbus_device *dev, | |||
977 | break; | 977 | break; |
978 | 978 | ||
979 | case XenbusStateClosing: | 979 | case XenbusStateClosing: |
980 | if (info->gd == NULL) | 980 | if (info->gd == NULL) { |
981 | xenbus_dev_fatal(dev, -ENODEV, "gd is NULL"); | 981 | xenbus_frontend_closed(dev); |
982 | break; | ||
983 | } | ||
982 | bd = bdget_disk(info->gd, 0); | 984 | bd = bdget_disk(info->gd, 0); |
983 | if (bd == NULL) | 985 | if (bd == NULL) |
984 | xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); | 986 | xenbus_dev_fatal(dev, -ENODEV, "bdget failed"); |