summaryrefslogtreecommitdiffstats
path: root/DirectVolume.cpp
diff options
context:
space:
mode:
authorSan Mehat <san@google.com>2010-04-15 12:58:50 -0700
committerSan Mehat <san@google.com>2010-04-15 12:59:15 -0700
commit1a06edaf4db4e9c520624bcc06e0e13ee470d90e (patch)
tree274a062c49efd0f44af1943ed8b7ab51e8211be0 /DirectVolume.cpp
parent97ac40e4e6f3ed0bd5d6878d7d8d4a54fcaecb76 (diff)
downloadsystem_vold-1a06edaf4db4e9c520624bcc06e0e13ee470d90e.tar.gz
system_vold-1a06edaf4db4e9c520624bcc06e0e13ee470d90e.tar.bz2
system_vold-1a06edaf4db4e9c520624bcc06e0e13ee470d90e.zip
vold: Ensure we cleanup secure containers on card removal.
Fixes bug: http://b/issue?id=2567572 Note: The framework will still likely restart since the system_server is holding references to assets on the card which are mmaped, but at least now storage will be available when a new card is re-inserted. Change-Id: I4e195c0c666426b93da47198fa826a6f58d855a9 Signed-off-by: San Mehat <san@google.com>
Diffstat (limited to 'DirectVolume.cpp')
-rw-r--r--DirectVolume.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/DirectVolume.cpp b/DirectVolume.cpp
index c269303..1f9f084 100644
--- a/DirectVolume.cpp
+++ b/DirectVolume.cpp
@@ -284,6 +284,11 @@ void DirectVolume::handlePartitionRemoved(const char *devpath, NetlinkEvent *evt
getLabel(), getMountpoint(), major, minor);
mVm->getBroadcaster()->sendBroadcast(ResponseCode::VolumeBadRemoval,
msg, false);
+
+ if (mVm->cleanupAsec(this, true)) {
+ SLOGE("Failed to cleanup ASEC - unmount will probably fail!");
+ }
+
if (Volume::unmountVol(true)) {
SLOGE("Failed to unmount volume on bad removal (%s)",
strerror(errno));