Revision 3ac906f7 block.c

b/block.c
1789 1789
{
1790 1790
    BlockDriverState *bs;
1791 1791

  
1792
    if (bs_snapshots)
1792
    if (bs_snapshots) {
1793 1793
        return bs_snapshots;
1794
    }
1794 1795

  
1795 1796
    bs = NULL;
1796 1797
    while ((bs = bdrv_next(bs))) {
1797 1798
        if (bdrv_can_snapshot(bs)) {
1798
            goto ok;
1799
            bs_snapshots = bs;
1800
            return bs;
1799 1801
        }
1800 1802
    }
1801 1803
    return NULL;
1802
 ok:
1803
    bs_snapshots = bs;
1804
    return bs;
1805 1804
}
1806 1805

  
1807 1806
int bdrv_snapshot_create(BlockDriverState *bs,

Also available in: Unified diff