Author: dgorbachev
Date: Sat Mar 10 14:06:02 2007
New Revision: 26055
URL:
http://svn.reactos.org/svn/reactos?rev=26055&view=rev
Log:
Disable incorrect optimization
Modified:
trunk/reactos/drivers/filesystems/vfat/finfo.c
Modified: trunk/reactos/drivers/filesystems/vfat/finfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/vfat/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/vfat/finfo.c (original)
+++ trunk/reactos/drivers/filesystems/vfat/finfo.c Sat Mar 10 14:06:02 2007
@@ -620,6 +620,7 @@
}
else
{
+#if 0 /* FIXME */
if (Fcb->LastCluster > 0)
{
if (Fcb->RFCB.AllocationSize.u.LowPart - ClusterSize == Fcb->LastOffset)
@@ -656,6 +657,12 @@
Status = OffsetToCluster(DeviceExt, Cluster,
ROUND_DOWN(NewSize - 1, ClusterSize) - Fcb->LastOffset,
&NCluster, TRUE);
+#else
+ Status = OffsetToCluster(DeviceExt, FirstCluster,
+ ROUND_DOWN(NewSize - 1, ClusterSize),
+ &Cluster, TRUE);
+ NCluster = Cluster;
+#endif
if (NCluster == 0xffffffff || !NT_SUCCESS(Status))
{
/* disk is full */
@@ -678,7 +685,7 @@
{
AllocSizeChanged = TRUE;
/* FIXME: Use the cached cluster/offset better way. */
- Fcb->LastCluster = Fcb->LastCluster = 0;
+ Fcb->LastCluster = Fcb->LastOffset = 0;
UpdateFileSize(FileObject, Fcb, NewSize, ClusterSize);
if (NewSize > 0)
{