Merge remote-tracking branch 'sstabellini/xen-fixes' into staging

* sstabellini/xen-fixes:
  xen_disk: detach the blkdev before bdrv_delete
  xen_console: ignore console disconnect events from console/0
This commit is contained in:
Anthony Liguori 2012-03-28 12:46:11 -05:00
commit 49e00ba969
2 changed files with 4 additions and 0 deletions

View File

@ -248,6 +248,9 @@ static void con_disconnect(struct XenDevice *xendev)
{
struct XenConsole *con = container_of(xendev, struct XenConsole, xendev);
if (!xendev->dev) {
return;
}
if (con->chr)
qemu_chr_add_handlers(con->chr, NULL, NULL, NULL, NULL);
xen_be_unbind_evtchn(&con->xendev);

View File

@ -726,6 +726,7 @@ static void blk_disconnect(struct XenDevice *xendev)
if (!blkdev->dinfo) {
/* close/delete only if we created it ourself */
bdrv_close(blkdev->bs);
bdrv_detach_dev(blkdev->bs, blkdev);
bdrv_delete(blkdev->bs);
}
blkdev->bs = NULL;