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
This commit is contained in:
Yi-Yo Chiang 2023-09-12 15:53:19 +08:00
parent 1b547892f6
commit 244e581a31

View file

@ -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;
}
}