am 60dec16c: Correctly remove asecs for full disk encryption
* commit '60dec16c5026d29a52791ad790860d247f47f8f2':
Correctly remove asecs for full disk encryption
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index b2b0cf6..14f1509 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -1090,8 +1090,14 @@
SLOGE("Timed out trying to rmdir %s (%s)", mountPoint, strerror(errno));
}
- if (Devmapper::destroy(idHash) && errno != ENXIO) {
- SLOGE("Failed to destroy devmapper instance (%s)", strerror(errno));
+ for (i=1; i <= UNMOUNT_RETRIES; i++) {
+ if (Devmapper::destroy(idHash) && errno != ENXIO) {
+ SLOGE("Failed to destroy devmapper instance (%s)", strerror(errno));
+ usleep(UNMOUNT_SLEEP_BETWEEN_RETRY_MS);
+ continue;
+ } else {
+ break;
+ }
}
char loopDevice[255];