snapshot.c (a3416197447e7846a927b6ccb4f1edb3a1982443) | snapshot.c (4f6fd3491cf0f768b135ed2e242bd1d1d2a2efec) |
---|---|
1/* 2 * Block layer snapshot related functions 3 * 4 * Copyright (c) 2003-2008 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 85 unchanged lines hidden (view full) --- 94 return drv->bdrv_snapshot_goto(bs, snapshot_id); 95 } 96 97 if (bs->file) { 98 drv->bdrv_close(bs); 99 ret = bdrv_snapshot_goto(bs->file, snapshot_id); 100 open_ret = drv->bdrv_open(bs, NULL, bs->open_flags); 101 if (open_ret < 0) { | 1/* 2 * Block layer snapshot related functions 3 * 4 * Copyright (c) 2003-2008 Fabrice Bellard 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a copy 7 * of this software and associated documentation files (the "Software"), to deal 8 * in the Software without restriction, including without limitation the rights --- 85 unchanged lines hidden (view full) --- 94 return drv->bdrv_snapshot_goto(bs, snapshot_id); 95 } 96 97 if (bs->file) { 98 drv->bdrv_close(bs); 99 ret = bdrv_snapshot_goto(bs->file, snapshot_id); 100 open_ret = drv->bdrv_open(bs, NULL, bs->open_flags); 101 if (open_ret < 0) { |
102 bdrv_delete(bs->file); | 102 bdrv_unref(bs->file); |
103 bs->drv = NULL; 104 return open_ret; 105 } 106 return ret; 107 } 108 109 return -ENOTSUP; 110} --- 47 unchanged lines hidden --- | 103 bs->drv = NULL; 104 return open_ret; 105 } 106 return ret; 107 } 108 109 return -ENOTSUP; 110} --- 47 unchanged lines hidden --- |