diff options
author | Paolo Bonzini | 2017-06-05 14:38:50 +0200 |
---|---|---|
committer | Fam Zheng | 2017-06-16 01:55:00 +0200 |
commit | d3faa13e5ffda779dcd58f39e8745370adb05d67 (patch) | |
tree | adc8d74261b334cba0a0bc52e30466af3c4694eb /blockdev.c | |
parent | docker: Add flex and bison to centos6 image (diff) | |
download | qemu-d3faa13e5ffda779dcd58f39e8745370adb05d67.tar.gz qemu-d3faa13e5ffda779dcd58f39e8745370adb05d67.tar.xz qemu-d3faa13e5ffda779dcd58f39e8745370adb05d67.zip |
block: access copy_on_read with atomic ops
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20170605123908.18777-2-pbonzini@redhat.com>
Signed-off-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/blockdev.c b/blockdev.c index 6472548186..ceea976b03 100644 --- a/blockdev.c +++ b/blockdev.c @@ -1791,7 +1791,7 @@ static void external_snapshot_commit(BlkActionState *common) /* We don't need (or want) to use the transactional * bdrv_reopen_multiple() across all the entries at once, because we * don't want to abort all of them if one of them fails the reopen */ - if (!state->old_bs->copy_on_read) { + if (!atomic_read(&state->old_bs->copy_on_read)) { bdrv_reopen(state->old_bs, state->old_bs->open_flags & ~BDRV_O_RDWR, NULL); } |