Fix vold wedge when unmounting Android/
In EmulatedVolume#doMount, if some operations fail, we call
EmulatedVolume#doUnmount.
During this unmount we try to unmount Android/ causing a FUSE_LOOKUP
on the FUSE mount. If the FUSE mount is not up, this can hang.
Now we introduce a new state to prevent unmounting Android/ if it
wasn't mounted.
Test: atest AdoptableHostTest
Bug: 151685786
Change-Id: I6246d3910c352034d2a4fb09ad9c1e7fd91cba5e
diff --git a/model/EmulatedVolume.h b/model/EmulatedVolume.h
index b25fb7c..9bff0ca 100644
--- a/model/EmulatedVolume.h
+++ b/model/EmulatedVolume.h
@@ -63,6 +63,9 @@
/* Whether we mounted FUSE for this volume */
bool mFuseMounted;
+ /* Whether we mounted Android/ for this volume */
+ bool mAndroidMounted;
+
/* Whether to use sdcardfs for this volume */
bool mUseSdcardFs;