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
diff --git a/Checkpoint.cpp b/Checkpoint.cpp
index eca49ef..598a87b 100644
--- a/Checkpoint.cpp
+++ b/Checkpoint.cpp
@@ -198,7 +198,8 @@
// 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) {