From 244e581a31da30508648b1a118f864dae491935f Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Tue, 12 Sep 2023 15:53:19 +0800 Subject: [PATCH] fs_mgr: Use /proc/mounts to check if /cache is mounted The fstab provided by the user/caller might not be the default fstab, which might not include the /cache mount entry. We should just use the procfs mount info to determine if /cache is currently mounted. Bug: 300036012 Test: adb_remount test Change-Id: I4643d0a21ae21f3513f715de424f0be1fe64ff9e --- fs_mgr/fs_mgr_overlayfs_control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs_mgr/fs_mgr_overlayfs_control.cpp b/fs_mgr/fs_mgr_overlayfs_control.cpp index 68576f220..2cc0d2d5e 100644 --- a/fs_mgr/fs_mgr_overlayfs_control.cpp +++ b/fs_mgr/fs_mgr_overlayfs_control.cpp @@ -688,7 +688,7 @@ bool fs_mgr_overlayfs_setup(const Fstab& fstab, const char* mount_point, bool* w continue; } } else { - if (GetEntryForMountPoint(&fstab, overlay_mount_point) == nullptr) { + if (!fs_mgr_overlayfs_already_mounted(overlay_mount_point, false /* overlay */)) { continue; } }