diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-03-30 14:33:03 +0000 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-04-13 17:34:26 +0000 |
commit | 77ba8fef8972854b7fad89d97a14f4f9c3eae7a8 (patch) | |
tree | 9ff02a3a2880328c5fbdecc97a3de1e48b43ddc8 /hw/xen_disk.c | |
parent | 9468e9c41a89b1c9f3a905b8959e1dd3f055c732 (diff) |
xen: handle backend deletion from xenstore
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'hw/xen_disk.c')
-rw-r--r-- | hw/xen_disk.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xen_disk.c b/hw/xen_disk.c index 9719395b09..22dbd10303 100644 --- a/hw/xen_disk.c +++ b/hw/xen_disk.c @@ -745,6 +745,10 @@ static int blk_free(struct XenDevice *xendev) struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev); struct ioreq *ioreq; + if (blkdev->bs || blkdev->sring) { + blk_disconnect(xendev); + } + while (!QLIST_EMPTY(&blkdev->freelist)) { ioreq = QLIST_FIRST(&blkdev->freelist); QLIST_REMOVE(ioreq, list); |