From 67f9044ab5b871f36db42e9f863c88b57c30e4a3 Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Fri, 12 Jun 2020 08:12:48 -0700 Subject: [PATCH] Don't call block checkpoint functions above dm-default-key Bug: 156225476 Test: Build for f2fs and ext4 device, make sure checkpoints roll back and commit Merged-In: Ic15fadc67d306463dd0b554f679306d8f9081451 Change-Id: Ic15fadc67d306463dd0b554f679306d8f9081451 --- MetadataCrypt.cpp | 2 +- cryptfs.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MetadataCrypt.cpp b/MetadataCrypt.cpp index 0a34007..ca2813d 100644 --- a/MetadataCrypt.cpp +++ b/MetadataCrypt.cpp @@ -99,7 +99,7 @@ static bool mount_via_fs_mgr(const char* mount_point, const char* blk_device) { } auto mount_rc = fs_mgr_do_mount(&fstab_default, const_cast(mount_point), const_cast(blk_device), nullptr, - android::vold::cp_needsCheckpoint()); + android::vold::cp_needsCheckpoint(), true); if (setexeccon(nullptr)) { PLOG(ERROR) << "Failed to clear setexeccon"; return false; diff --git a/cryptfs.cpp b/cryptfs.cpp index 1ddb34b..8b7ac0a 100644 --- a/cryptfs.cpp +++ b/cryptfs.cpp @@ -1625,7 +1625,7 @@ static int cryptfs_restart_internal(int restart_main) { } bool needs_cp = android::vold::cp_needsCheckpoint(); while ((mount_rc = fs_mgr_do_mount(&fstab_default, DATA_MNT_POINT, crypto_blkdev, 0, - needs_cp)) != 0) { + needs_cp, false)) != 0) { if (mount_rc == FS_MGR_DOMNT_BUSY) { /* TODO: invoke something similar to Process::killProcessWithOpenFiles(DATA_MNT_POINT,