Do not disable performance mode too early for backup

Include SetPerformanceMode(false) just before every "return", and not
sooner.

Change-Id: Iefd5546865347dbd08cc9baeb98d58d26b7f4a3b
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 871b082..0395f17 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -588,7 +588,6 @@
 		else
 			md5Success = Make_MD5(part_settings);
 
-		TWFunc::SetPerformanceMode(false);
 		if (part_settings->Part->Has_SubPartition) {
 			std::vector<TWPartition*>::iterator subpart;
 			TWPartition *parentPart = part_settings->Part;
@@ -597,10 +596,10 @@
 				if ((*subpart)->Can_Be_Backed_Up && (*subpart)->Is_SubPartition && (*subpart)->SubPartition_Of == parentPart->Mount_Point) {
 					part_settings->Part = *subpart;
 					if (!(*subpart)->Backup(part_settings, &tar_fork_pid)) {
-						TWFunc::SetPerformanceMode(false);
 						Clean_Backup_Folder(part_settings->Backup_Folder);
 						TWFunc::copy_file("/tmp/recovery.log", backup_log, 0644);
 						tw_set_default_metadata(backup_log.c_str());
+						TWFunc::SetPerformanceMode(false);
 						return false;
 					}
 					sync();
@@ -625,6 +624,7 @@
 
 		}
 
+		TWFunc::SetPerformanceMode(false);
 		return md5Success;
 	} else {
 		Clean_Backup_Folder(part_settings->Backup_Folder);