summary refs log tree commit diff stats
path: root/hw/xen_disk.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-03-28 12:46:11 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-03-28 12:46:11 -0500
commit49e00ba9698469b5eccec947050216192d9a9e34 (patch)
treeaff79a28cd2dec276d576f94ea7c299c096fe694 /hw/xen_disk.c
parentc76d1a9b3f367754966c326d81ff8566798b473a (diff)
parent7429f2e1981c6cc77a853e2e88654001bdddd461 (diff)
downloadfocaccia-qemu-49e00ba9698469b5eccec947050216192d9a9e34.tar.gz
focaccia-qemu-49e00ba9698469b5eccec947050216192d9a9e34.zip
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
Diffstat (limited to 'hw/xen_disk.c')
-rw-r--r--hw/xen_disk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 68fa36a1cf..bf06fc1978 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -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;