فهرست منبع

qcow2: Don't ignore failure to clear autoclear flags

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Kevin Wolf 13 سال پیش
والد
کامیت
c44bfe4637
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      block/qcow2.c

+ 4 - 1
block/qcow2.c

@@ -300,7 +300,10 @@ static int qcow2_open(BlockDriverState *bs, int flags)
 
 
     if (!bs->read_only && s->autoclear_features != 0) {
     if (!bs->read_only && s->autoclear_features != 0) {
         s->autoclear_features = 0;
         s->autoclear_features = 0;
-        qcow2_update_header(bs);
+        ret = qcow2_update_header(bs);
+        if (ret < 0) {
+            goto fail;
+        }
     }
     }
 
 
     /* Check support for various header values */
     /* Check support for various header values */