Merge "Do not trim unless we are actually checkpointing"
am: 2268c285a5

Change-Id: I031a25204269ea7d3d65349a3f281a3f1e07eadd
diff --git a/Checkpoint.cpp b/Checkpoint.cpp
index c33d934..abda045 100644
--- a/Checkpoint.cpp
+++ b/Checkpoint.cpp
@@ -202,6 +202,10 @@
 }
 
 Status cp_prepareCheckpoint() {
+    if (!isCheckpointing) {
+        return Status::ok();
+    }
+
     Fstab mounts;
     if (!ReadFstabFromFile("/proc/mounts", &mounts)) {
         return Status::fromExceptionCode(EINVAL, "Failed to get /proc/mounts");