aboutsummaryrefslogtreecommitdiff
path: root/block/sheepdog.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/sheepdog.c')
-rw-r--r--block/sheepdog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/sheepdog.c b/block/sheepdog.c
index dea9000bdd..c9236679c6 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -697,7 +697,8 @@ out:
srco->co = NULL;
srco->ret = ret;
- srco->finished = true;
+ /* Set srco->finished before reading bs->wakeup. */
+ atomic_mb_set(&srco->finished, true);
if (srco->bs) {
bdrv_wakeup(srco->bs);
}