[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [qemu-upstream-unstable] block: ensure bdrv_drain_all() works during bdrv_delete()
commit 670599a08c052f6ef841743731a8f06d4b50ec99 Author: Stefan Hajnoczi <stefanha@xxxxxxxxxx> AuthorDate: Thu Jun 27 15:32:26 2013 +0200 Commit: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx> CommitDate: Tue Sep 24 16:31:10 2013 -0500 block: ensure bdrv_drain_all() works during bdrv_delete() In bdrv_delete() make sure to call bdrv_make_anon() *after* bdrv_close() so that the device is still seen by bdrv_drain_all() when iterating bdrv_states. Cc: qemu-stable@xxxxxxxxxx Signed-off-by: Stefan Hajnoczi <stefanha@xxxxxxxxxx> (cherry picked from commit e1b5c52e04d04bb93546c6e37e8884889d047cb1) Signed-off-by: Michael Roth <mdroth@xxxxxxxxxxxxxxxxxx> --- block.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 01b66d8..d5ce8d3 100644 --- a/block.c +++ b/block.c @@ -1606,11 +1606,11 @@ void bdrv_delete(BlockDriverState *bs) assert(!bs->job); assert(!bs->in_use); + bdrv_close(bs); + /* remove from list, if necessary */ bdrv_make_anon(bs); - bdrv_close(bs); - g_free(bs); } -- generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |