]> git.proxmox.com Git - mirror_qemu.git/commit - block/commit.c
commit: Fix completion with extra reference
authorKevin Wolf <kwolf@redhat.com>
Fri, 9 Jun 2017 11:29:36 +0000 (13:29 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 26 Jun 2017 12:51:12 +0000 (14:51 +0200)
commit4f78a16fee462471416dc49b409d57b2071cf3d9
tree9e9226fbfb4c5c92f20d6c44140f29f50208029e
parent931892e8a691a8a4151cc5fe1e13c14294bb28fb
commit: Fix completion with extra reference

commit_complete() can't assume that after its block_job_completed() the
job is actually immediately freed; someone else may still be holding
references. In this case, the op blockers on the intermediate nodes make
the graph reconfiguration in the completion code fail.

Call block_job_remove_all_bdrv() manually so that we know for sure that
any blockers on intermediate nodes are given up.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
block/commit.c