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

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

Change-Id: Ia2a497e993ed5302f527840ed0b74fec58e994a1
diff --git a/model/PublicVolume.cpp b/model/PublicVolume.cpp
index 64b5dfa..9ca782b 100644
--- a/model/PublicVolume.cpp
+++ b/model/PublicVolume.cpp
@@ -238,6 +238,7 @@
 
         if (result != 0) {
             LOG(ERROR) << "Failed to mount public fuse volume";
+            doUnmount();
             return -result;
         }
 
@@ -247,6 +248,8 @@
             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;
             }
         }