diff --git a/block/io.c b/block/io.c index a32fd1d9e5..80d6c62a85 100644 --- a/block/io.c +++ b/block/io.c @@ -2300,7 +2300,7 @@ int coroutine_fn bdrv_co_flush(BlockDriverState *bs) bdrv_inc_in_flight(bs); - if (!bs || !bdrv_is_inserted(bs) || bdrv_is_read_only(bs) || + if (!bdrv_is_inserted(bs) || bdrv_is_read_only(bs) || bdrv_is_sg(bs)) { goto early_exit; }