fastboot: call fs_mgr_overlayfs_teardown() in UpdateSuper

When the update-super command is issued, we want overlayfs overrides
to disappear without a doubt, which includes non-A/B utilizing
/cache/overlay/ tree.  Call fs_mgr_overlayfs_teardown() on successful
return.

Test: adb-remount-test.sh
Bug: 120034852
Change-Id: Ia5cdb797f7e8350b5591a51fc8ae5f323901aee4
This commit is contained in:
Mark Salyzyn 2018-11-26 09:57:17 -08:00
parent 9040aa5665
commit 307a41fe9f

View file

@ -153,6 +153,7 @@ bool UpdateSuper(FastbootDevice* device, const std::string& super_name, bool wip
if (!FlashPartitionTable(super_name, *new_metadata.get())) {
return device->WriteFail("Unable to flash new partition table");
}
fs_mgr_overlayfs_teardown();
return device->WriteOkay("Successfully flashed partition table");
}
@ -186,5 +187,6 @@ bool UpdateSuper(FastbootDevice* device, const std::string& super_name, bool wip
if (!UpdateAllPartitionMetadata(super_name, *new_metadata.get())) {
return device->WriteFail("Unable to write new partition table");
}
fs_mgr_overlayfs_teardown();
return device->WriteOkay("Successfully updated partition table");
}