OSDN Git Service

xen_disk: simplify blk_disconnect with refcnt
authorFam Zheng <famz@redhat.com>
Fri, 23 Aug 2013 01:14:49 +0000 (09:14 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Fri, 6 Sep 2013 13:25:08 +0000 (15:25 +0200)
commitc0777fe18b08c3a6de0c53325d6b9b75ebb9de9a
tree75fc7f7797752dae9210d8d89c2f5faca1db5189
parent8442cfd0346de849264494c5adedbac12553867e
xen_disk: simplify blk_disconnect with refcnt

We call bdrv_attach_dev when initializing whether or not bs is created
locally, so call bdrv_detach_dev and let the refcnt handle the
lifecycle.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/block/xen_disk.c