Message ID | 20240118180031.2513319-1-mjt@tls.msk.ru |
---|---|
State | New |
Headers | show |
Series | Patch Round-up for stable 7.2.9, freeze on 2024-01-27 | expand |
diff --git a/block/snapshot.c b/block/snapshot.c index e22ac3eac6..86e29ca59f 100644 --- a/block/snapshot.c +++ b/block/snapshot.c @@ -190,8 +190,10 @@ static BlockDriverState *bdrv_snapshot_fallback(BlockDriverState *bs) int bdrv_can_snapshot(BlockDriverState *bs) { BlockDriver *drv = bs->drv; + GLOBAL_STATE_CODE(); - if (!drv || !bdrv_is_inserted(bs) || bdrv_is_read_only(bs)) { + + if (!drv || !bdrv_is_inserted(bs) || !bdrv_is_writable(bs)) { return 0; }