userlibandfileserver/fileserver/sfile/sf_file_cache.cpp
changeset 139 95f71bcdcdb7
parent 109 b3a1d9898418
child 152 657f875b013e
--- a/userlibandfileserver/fileserver/sfile/sf_file_cache.cpp	Fri May 14 17:13:29 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_file_cache.cpp	Thu May 27 14:17:14 2010 +0300
@@ -1503,6 +1503,11 @@
 					// Need to reset currentOperation.iReadWriteArgs.iTotalLength here to make sure 
 					// TFsFileWrite::PostInitialise() doesn't think there's no data left to process
 					aMsgRequest.ReStart();
+					
+					//Need to preserve the current state otherwise if we are over the ram threshold 
+					//the request can end up in a livelock trying to repeatedly flush.
+					currentOperation->iState = EStWriteThrough;
+					
 					if (r == CFsRequest::EReqActionBusy || r != CFsRequest::EReqActionComplete)
 						return r;
 					}