diff options
| author | 2017-04-01 06:46:31 +0000 | |
|---|---|---|
| committer | 2017-04-01 06:46:32 +0000 | |
| commit | c04b06dc81a41bba8b697e774e6f9014f4f4a053 (patch) | |
| tree | c9ca6ff79adcd8c1e2314aa1115e6f6a59fe2477 | |
| parent | 3946df68edb1755b94a1fd9941a3ce553070852c (diff) | |
| parent | 06f393067772f613e938f794444dc90e90c40fc0 (diff) | |
Merge "In MountEmulatedStorage() do not try to mount for mode MOUNT_EXTERNAL_NONE."
| -rw-r--r-- | core/jni/com_android_internal_os_Zygote.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index 90ad2da6fb18..ac9e636adb2a 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -346,6 +346,11 @@ static bool MountEmulatedStorage(uid_t uid, jint mount_mode, return false; } + // Handle force_mount_namespace with MOUNT_EXTERNAL_NONE. + if (mount_mode == MOUNT_EXTERNAL_NONE) { + return true; + } + if (TEMP_FAILURE_RETRY(mount(storageSource.string(), "/storage", NULL, MS_BIND | MS_REC | MS_SLAVE, NULL)) == -1) { ALOGW("Failed to mount %s to /storage: %s", storageSource.string(), strerror(errno)); |