From fd5eb260c4871f67d73d6d1aa591d9e4ddf00c6c Mon Sep 17 00:00:00 2001 From: Kelvin Zhang Date: Wed, 24 Apr 2024 14:15:06 -0700 Subject: [PATCH] Get the correct fstab entry if there are more than one vold currently uses the first fstab entry for moun point /data . However, if there are multiple fstab entries for /data and the first one isn't the entry actually being used, checkpoint may fail. Test: boot a device with ext4 entry placed after f2fs Bug: 293313353 Change-Id: Id374c622c53fd61047d62743555234d36bd038ec --- Checkpoint.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Checkpoint.cpp b/Checkpoint.cpp index eca49ef..598a87b 100644 --- a/Checkpoint.cpp +++ b/Checkpoint.cpp @@ -198,7 +198,8 @@ Status cp_commitChanges() { // Walk mounted file systems for (const auto& mount_rec : mounts) { - const auto fstab_rec = GetEntryForMountPoint(&fstab_default, mount_rec.mount_point); + const auto fstab_rec = + GetEntryForMountPoint(&fstab_default, mount_rec.mount_point, mount_rec.fs_type); if (!fstab_rec) continue; if (fstab_rec->fs_mgr_flags.checkpoint_fs) {