userlibandfileserver/fileserver/sfile/sf_file.cpp
changeset 201 43365a9b78a3
parent 200 73ea206103e6
child 247 d8d70de2bd36
--- a/userlibandfileserver/fileserver/sfile/sf_file.cpp	Wed Jun 23 19:44:53 2010 +0300
+++ b/userlibandfileserver/fileserver/sfile/sf_file.cpp	Tue Jul 06 15:50:07 2010 +0300
@@ -1026,9 +1026,6 @@
 			{
 			file->SetNotifyAsyncReadersPending(ETrue);
 			}
-		
-        file->iAtt |= KEntryAttModified;
-
 		}
 	else if (aRetVal == KErrCorrupt)
 		file->SetFileCorrupt(ETrue);
@@ -1686,7 +1683,7 @@
 	
     TUint setAttMask=(TUint)(aRequest->Message().Int0());
 	TUint clearAttMask=(TUint)aRequest->Message().Int1();
-	ValidateAtts(share->File().Att(),setAttMask,clearAttMask);
+	ValidateAtts(setAttMask,clearAttMask);
 	OstTraceExt3(TRACE_FILESYSTEM, FSYS_ECFILECBSETENTRYL1, "this %x aSetAttMask %x aClearAttMask %x", (TUint) &share->File(), (TUint) setAttMask, (TUint) clearAttMask);
 	TRAP(r,share->File().SetEntryL(TTime(0),setAttMask,clearAttMask))
 	OstTrace1(TRACE_FILESYSTEM, FSYS_ECFILECBSETENTRYL1RET, "r %d", r);
@@ -1796,7 +1793,7 @@
 	aRequest->ReadL(KMsgPtr0,t);
 	TUint setAttMask=(TUint)(aRequest->Message().Int1()|KEntryAttModified);
 	TUint clearAttMask=(TUint)aRequest->Message().Int2();
-	ValidateAtts(share->File().Att(),setAttMask,clearAttMask);//	Validate attributes
+	ValidateAtts(setAttMask,clearAttMask);//	Validate attributes
 
 	OstTraceExt3(TRACE_FILESYSTEM, FSYS_ECFILECBSETENTRYL3, "this %x aSetAttMask %x aClearAttMask %x", (TUint) &share->File(), (TUint) setAttMask, (TUint) clearAttMask);
 	TRAP(r,share->File().SetEntryL(time,setAttMask,clearAttMask))
@@ -3444,20 +3441,12 @@
 the file size shall be modified after acquiring the iLock mutex and if it is ETrue, 
 the file size shall be modified without aquiring the iLock mutex.  
 */
-EXPORT_C void CFileCB::SetSize64(TInt64 aSize, TBool aDriveLocked)
+EXPORT_C void CFileCB::SetSize64(TInt64 aSize, TBool /*aDriveLocked*/)
 	{
-	if(aDriveLocked)
-		{
-		iSize = (TInt)I64LOW(aSize);
-		iBody->iSizeHigh = (TInt)I64HIGH(aSize);
-		}
-	else
-		{
-		Drive().Lock();
-		iSize = (TInt)I64LOW(aSize);
-		iBody->iSizeHigh = (TInt)I64HIGH(aSize);
-		Drive().UnLock();
-		}
+	// cuurently this should only be called from the drive thread
+	ASSERT(FsThreadManager::IsDriveThread(Drive().DriveNumber(),EFalse));
+	iSize = (TInt)I64LOW(aSize);
+	iBody->iSizeHigh = (TInt)I64HIGH(aSize);
 	}