diff options
author | Kelvin Zhang <zhangkelvin@google.com> | 2024-04-24 14:15:06 -0700 |
---|---|---|
committer | Kelvin Zhang <zhangkelvin@google.com> | 2024-04-24 14:15:06 -0700 |
commit | fd5eb260c4871f67d73d6d1aa591d9e4ddf00c6c (patch) | |
tree | 5b99a152b7c1993664cb09148431ddf5a851cb0e | |
parent | 7c7fb49a3c9ca5de01a651ad6f929389c2162a11 (diff) | |
download | vold-fd5eb260c4871f67d73d6d1aa591d9e4ddf00c6c.tar.gz |
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
-rw-r--r-- | Checkpoint.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Checkpoint.cpp b/Checkpoint.cpp index eca49ef5..598a87bc 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) { |