Skip to content

Commit

Permalink
fs_mgr: Use /proc/mounts to check if /cache is mounted
Browse files Browse the repository at this point in the history
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
  • Loading branch information
silverneko committed Sep 12, 2023
1 parent 1b54789 commit 244e581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs_mgr/fs_mgr_overlayfs_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 244e581

Please sign in to comment.