diff options
Diffstat (limited to 'block/io.c')
-rw-r--r-- | block/io.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/block/io.c b/block/io.c index bb1c9c5432..bc69b4cecd 100644 --- a/block/io.c +++ b/block/io.c @@ -1405,9 +1405,7 @@ static int coroutine_fn bdrv_aligned_pwritev(BdrvChild *child, ++bs->write_gen; bdrv_set_dirty(bs, start_sector, end_sector - start_sector); - if (bs->wr_highest_offset < offset + bytes) { - bs->wr_highest_offset = offset + bytes; - } + stat64_max(&bs->wr_highest_offset, offset + bytes); if (ret >= 0) { bs->total_sectors = MAX(bs->total_sectors, end_sector); |