Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block: cdrom: beyond ARRAY_SIZE of viocd_diskinfo xen/blkfront: fix warning when deleting gendisk on unplug/shutdown xen/blkfront: allow xenbus state transition to Closing->Closed when not Connected
This commit is contained in:
@@ -934,8 +934,6 @@ static void blkfront_closing(struct xenbus_device *dev)
|
|||||||
|
|
||||||
spin_lock_irqsave(&blkif_io_lock, flags);
|
spin_lock_irqsave(&blkif_io_lock, flags);
|
||||||
|
|
||||||
del_gendisk(info->gd);
|
|
||||||
|
|
||||||
/* No more blkif_request(). */
|
/* No more blkif_request(). */
|
||||||
blk_stop_queue(info->rq);
|
blk_stop_queue(info->rq);
|
||||||
|
|
||||||
@@ -949,6 +947,8 @@ static void blkfront_closing(struct xenbus_device *dev)
|
|||||||
blk_cleanup_queue(info->rq);
|
blk_cleanup_queue(info->rq);
|
||||||
info->rq = NULL;
|
info->rq = NULL;
|
||||||
|
|
||||||
|
del_gendisk(info->gd);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
xenbus_frontend_closed(dev);
|
xenbus_frontend_closed(dev);
|
||||||
}
|
}
|
||||||
@@ -977,8 +977,10 @@ static void backend_changed(struct xenbus_device *dev,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case XenbusStateClosing:
|
case XenbusStateClosing:
|
||||||
if (info->gd == NULL)
|
if (info->gd == NULL) {
|
||||||
xenbus_dev_fatal(dev, -ENODEV, "gd is NULL");
|
xenbus_frontend_closed(dev);
|
||||||
|
break;
|
||||||
|
}
|
||||||
bd = bdget_disk(info->gd, 0);
|
bd = bdget_disk(info->gd, 0);
|
||||||
if (bd == NULL)
|
if (bd == NULL)
|
||||||
xenbus_dev_fatal(dev, -ENODEV, "bdget failed");
|
xenbus_dev_fatal(dev, -ENODEV, "bdget failed");
|
||||||
|
@@ -587,7 +587,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)
|
|||||||
struct device_node *node = vdev->dev.archdata.of_node;
|
struct device_node *node = vdev->dev.archdata.of_node;
|
||||||
|
|
||||||
deviceno = vdev->unit_address;
|
deviceno = vdev->unit_address;
|
||||||
if (deviceno > VIOCD_MAX_CD)
|
if (deviceno >= VIOCD_MAX_CD)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
if (!node)
|
if (!node)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
Reference in New Issue
Block a user