userlibandfileserver/fileserver/sfile/sf_file_cache.cpp
branchRCL_3
changeset 26 c734af59ce98
parent 0 a41df078684a
child 41 0ffb4e86fcc9
--- a/userlibandfileserver/fileserver/sfile/sf_file_cache.cpp	Tue Apr 27 18:02:57 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_file_cache.cpp	Tue May 11 17:28:22 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;
 					}