Revision e14e8ba5 block/qcow2-refcount.c

b/block/qcow2-refcount.c
93 93
    int ret;
94 94

  
95 95
    if (cache_refcount_updates) {
96
        write_refcount_block(bs);
96
        ret = write_refcount_block(bs);
97
        if (ret < 0) {
98
            return ret;
99
        }
97 100
    }
98 101

  
99 102
    BLKDBG_EVENT(bs->file, BLKDBG_REFBLOCK_LOAD);
100 103
    ret = bdrv_pread(bs->file, refcount_block_offset, s->refcount_block_cache,
101 104
                     s->cluster_size);
102
    if (ret != s->cluster_size)
103
        return -EIO;
105
    if (ret < 0) {
106
        return ret;
107
    }
108

  
104 109
    s->refcount_block_cache_offset = refcount_block_offset;
105 110
    return 0;
106 111
}

Also available in: Unified diff