提交 3ac906f7 编写于 作者: M Markus Armbruster 提交者: Kevin Wolf

block: Clean up bdrv_snapshots()

Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 f9092b10
......@@ -1789,19 +1789,18 @@ BlockDriverState *bdrv_snapshots(void)
{
BlockDriverState *bs;
if (bs_snapshots)
if (bs_snapshots) {
return bs_snapshots;
}
bs = NULL;
while ((bs = bdrv_next(bs))) {
if (bdrv_can_snapshot(bs)) {
goto ok;
bs_snapshots = bs;
return bs;
}
}
return NULL;
ok:
bs_snapshots = bs;
return bs;
}
int bdrv_snapshot_create(BlockDriverState *bs,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册