From db08694bb1d881f36b6c05fbaa81595ebf4b3921 Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Tue, 19 Feb 2019 14:18:54 -0800 Subject: [PATCH] Do not trim unless we are actually checkpointing I'm not convinced this explains the full regression, but it's a worthwhile fix anyway. Bug: 124774357 Test: Booted in checkpoint mode and non checkpoint mode Change-Id: I6e0e1e59e27bd127feac218fff7d88bb3570b530 --- Checkpoint.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Checkpoint.cpp b/Checkpoint.cpp index 0a64395..0f6edcf 100644 --- a/Checkpoint.cpp +++ b/Checkpoint.cpp @@ -202,6 +202,10 @@ bool cp_needsCheckpoint() { } Status cp_prepareCheckpoint() { + if (!isCheckpointing) { + return Status::ok(); + } + Fstab mounts; if (!ReadFstabFromFile("/proc/mounts", &mounts)) { return Status::fromExceptionCode(EINVAL, "Failed to get /proc/mounts");