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:
commit
6343f2dc12
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue