]> git.proxmox.com Git - mirror_qemu.git/commit
qemu-img: Take graph lock more selectively
authorKevin Wolf <kwolf@redhat.com>
Wed, 10 May 2023 20:35:57 +0000 (22:35 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 19 May 2023 17:12:12 +0000 (19:12 +0200)
commit3db0c8b25c452b53aabc8efa36e655c7c02abb8f
tree5c38d0cd7a2b6bcd88d20b7a0b5d000e8054a4d9
parente3e31dc87208007784b93a19f8efcdda90ea64f6
qemu-img: Take graph lock more selectively

If we take a reader lock, we can't call any functions that take a writer
lock internally without causing deadlocks once the reader lock is
actually enforced in the main thread, too. Take the reader lock only
where it is actually needed.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20230510203601.418015-5-kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-img.c