]> git.proxmox.com Git - qemu.git/blobdiff - block.c
linux-user/syscall.c: Don't warn about unimplemented get_robust_list
[qemu.git] / block.c
diff --git a/block.c b/block.c
index 45829619651ad1a013070808276f4c82095ffef1..124a9ebf65cd6830ca691c0642a1a57960436354 100644 (file)
--- a/block.c
+++ b/block.c
@@ -1640,9 +1640,11 @@ int bdrv_commit_all(void)
     BlockDriverState *bs;
 
     QTAILQ_FOREACH(bs, &bdrv_states, list) {
-        int ret = bdrv_commit(bs);
-        if (ret < 0) {
-            return ret;
+        if (bs->drv && bs->backing_hd) {
+            int ret = bdrv_commit(bs);
+            if (ret < 0) {
+                return ret;
+            }
         }
     }
     return 0;