Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e3a18c1c authored by Yifan Hong's avatar Yifan Hong Committed by android-build-merger
Browse files

Merge "libsnapshot: Don't accidentally delete snapshot when collapsing" am:...

Merge "libsnapshot: Don't accidentally delete snapshot when collapsing" am: 48eb2ee1 am: 44d025d9
am: 8786b58b

Change-Id: I4cfcd3d2a742d50e6cb0d492eddaf141e2222392
parents 99944810 8786b58b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -953,7 +953,7 @@ bool SnapshotManager::CollapseSnapshotDevice(const std::string& name,
    // flushed remaining I/O. We could in theory replace with dm-zero (or
    // re-use the table above), but for now it's better to know why this
    // would fail.
    if (!dm.DeleteDeviceIfExists(dm_name)) {
    if (dm_name != name && !dm.DeleteDeviceIfExists(dm_name)) {
        LOG(ERROR) << "Unable to delete snapshot device " << dm_name << ", COW cannot be "
                   << "reclaimed until after reboot.";
        return false;