update_engine: Remove any (stale) read-only flag before r/w mount of system

Change-Id: I9f4e07209dfab3d1fe2640101718ae8da8e19c54
diff --git a/payload_consumer/postinstall_runner_action.cc b/payload_consumer/postinstall_runner_action.cc
index ad1ffc0..6e10cea 100644
--- a/payload_consumer/postinstall_runner_action.cc
+++ b/payload_consumer/postinstall_runner_action.cc
@@ -215,6 +215,10 @@
   LOG(INFO) << source_path << " has been mounted R/W " << mount_count << " times.";
 
   if (mount_count > 0) {
+    if (!utils::SetBlockDeviceReadOnly(mountable_device, false)) {
+      LOG(ERROR) << "Error marking the device " << mountable_device << " writeable.";
+      return false;
+    }
     // Mount the target partition R/W
     LOG(INFO) << "Running backuptool scripts";
     utils::MountFilesystem(mountable_device, fs_mount_dir_, MS_NOATIME | MS_NODEV | MS_NODIRATIME,