Unmount public volume if FUSE mount fails am: f71707916f am: c1f45db6e1 am: 3875f982dc

Original change: https://googleplex-android-review.googlesource.com/c/platform/system/vold/+/11900947

Change-Id: I55d927eb0b7067aea68287dd5d89383ca4a45d9b
This commit is contained in:
Zim 2020-06-22 17:21:12 +00:00 committed by Automerger Merge Worker
commit 6343f2dc12

View file

@ -238,6 +238,7 @@ status_t PublicVolume::doMount() {
if (result != 0) {
LOG(ERROR) << "Failed to mount public fuse volume";
doUnmount();
return -result;
}
@ -247,6 +248,8 @@ status_t PublicVolume::doMount() {
bool is_ready = false;
callback->onVolumeChecking(std::move(fd), getPath(), getInternalPath(), &is_ready);
if (!is_ready) {
LOG(ERROR) << "Failed to complete public volume mount";
doUnmount();
return -EIO;
}
}