Avoid touching FUSE mounts on vold binder threads
On user unlock when persist.sys.fuse property is set,
StorageManagerService calls into vold to link the primary
volumes. Because this involves accessing a FUSE path that
has not been initialized, vold should offload this work
from the binder thread, otherwise it would wedge and the
system server would wedge causing a Watchdog trigger.
This fixes a bug where we 'link primary' twice and vold
gets wedged on system server restarts.
Bug: 140064376
Test: with the FUSE property set:
adb shell stop && adb shell start && adb shell ls /sdcard
Change-Id: I0eb86f8ba256c385c916e2a0389a4f7482fc3775
diff --git a/VolumeManager.cpp b/VolumeManager.cpp
index 2eb1ed5..adb4a5c 100644
--- a/VolumeManager.cpp
+++ b/VolumeManager.cpp
@@ -395,6 +395,7 @@
auto symlinkInfo = new std::pair<std::string, std::string>(source, target);
std::thread(symlinkPrimary, symlinkInfo).detach();
+ return 0;
}
std::string source(mPrimary->getPath());