summaryrefslogtreecommitdiffstats
path: root/block.c
diff options
context:
space:
mode:
authorPeter Maydell2019-05-10 19:44:59 +0200
committerPeter Maydell2019-05-10 19:44:59 +0200
commitc9ba36ff2f56a95dec0ee47f4dab0b22a0a01f86 (patch)
tree67e4cadaf991c9816be2313b243467722e366f7a /block.c
parentMerge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into ... (diff)
parentiotests: Add test for rebase without input base (diff)
downloadqemu-c9ba36ff2f56a95dec0ee47f4dab0b22a0a01f86.tar.gz
qemu-c9ba36ff2f56a95dec0ee47f4dab0b22a0a01f86.tar.xz
qemu-c9ba36ff2f56a95dec0ee47f4dab0b22a0a01f86.zip
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging
Block layer patches: - block: Remove bdrv_read() and bdrv_write() - qemu-img: Allow rebase with no input base - blockjob: Fix coroutine thread after AioContext change - MAINTAINERS updates for pflash, curl and gluster # gpg: Signature made Fri 10 May 2019 16:39:54 BST # gpg: using RSA key 7F09B272C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full] # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74 56FE 7F09 B272 C88F 2FD6 * remotes/kevin/tags/for-upstream: iotests: Add test for rebase without input base qemu-img: Use zero writes after source backing EOF qemu-img: Allow rebase with no input base qcow2: Remove BDRVQcow2State.cluster_sectors block: Remove bdrv_read() and bdrv_write() vvfat: Replace bdrv_{read,write}() with bdrv_{pread,pwrite}() vdi: Replace bdrv_{read,write}() with bdrv_{pread,pwrite}() qcow2: Replace bdrv_write() with bdrv_pwrite() qemu-img: Use IEC binary prefixes for size constants test-block-iothread: Job coroutine thread after AioContext switch blockjob: Fix coroutine thread after AioContext change qemu-iotests: Fix cleanup for 192 MAINTAINERS: Add an entry for the Parallel NOR Flash devices MAINTAINERS: Downgrade status of block sections without "M:" to "Odd Fixes" block: remove bs from lists before closing Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'block.c')
-rw-r--r--block.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block.c b/block.c
index 5c2c6aa761..6999aad446 100644
--- a/block.c
+++ b/block.c
@@ -4082,14 +4082,14 @@ static void bdrv_delete(BlockDriverState *bs)
assert(bdrv_op_blocker_is_empty(bs));
assert(!bs->refcnt);
- bdrv_close(bs);
-
/* remove from list, if necessary */
if (bs->node_name[0] != '\0') {
QTAILQ_REMOVE(&graph_bdrv_states, bs, node_list);
}
QTAILQ_REMOVE(&all_bdrv_states, bs, bs_list);
+ bdrv_close(bs);
+
g_free(bs);
}