diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/io.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2372,7 +2372,9 @@ flush_parent: ret = bs->file ? bdrv_co_flush(bs->file->bs) : 0; out: /* Notify any pending flushes that we have completed */ - bs->flushed_gen = current_gen; + if (ret == 0) { + bs->flushed_gen = current_gen; + } bs->active_flush_req = false; /* Return value is ignored - it's ok if wait queue is empty */ qemu_co_queue_next(&bs->flush_queue); |