Author: jmorlan
Date: Wed Dec 17 21:09:45 2008
New Revision: 38163
URL:
http://svn.reactos.org/svn/reactos?rev=38163&view=rev
Log:
FAT##FindAndMarkAvailableCluster: Decrement the AvailableClusters count to keep reported
free space consistent.
Modified:
trunk/reactos/drivers/filesystems/fastfat/fat.c
Modified: trunk/reactos/drivers/filesystems/fastfat/fat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/fat.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/fat.c [iso-8859-1] Wed Dec 17 21:09:45 2008
@@ -164,6 +164,8 @@
*Block = 0xffff;
CcSetDirtyPinnedData(Context, NULL);
CcUnpinData(Context);
+ if (DeviceExt->AvailableClustersValid)
+ InterlockedDecrement((PLONG)&DeviceExt->AvailableClusters);
return(STATUS_SUCCESS);
}
@@ -227,6 +229,8 @@
*CBlock = (*CBlock & 0xf) | 0xfff0;
CcSetDirtyPinnedData(Context, NULL);
CcUnpinData(Context);
+ if (DeviceExt->AvailableClustersValid)
+ InterlockedDecrement((PLONG)&DeviceExt->AvailableClusters);
return(STATUS_SUCCESS);
}
}
@@ -281,6 +285,8 @@
*Block = 0x0fffffff;
CcSetDirtyPinnedData(Context, NULL);
CcUnpinData(Context);
+ if (DeviceExt->AvailableClustersValid)
+ InterlockedDecrement((PLONG)&DeviceExt->AvailableClusters);
return(STATUS_SUCCESS);
}