mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTFS]
Fix broken check for free disk space in NtfsAllocateClusters(). svn path=/branches/GSoC_2016/NTFS/; revision=71858
This commit is contained in:
parent
7a6e9bcdf6
commit
de5cff4b37
1 changed files with 8 additions and 2 deletions
|
@ -162,8 +162,14 @@ NtfsAllocateClusters(PDEVICE_EXTENSION DeviceExt,
|
|||
RtlInitializeBitMap(&Bitmap, (PULONG)BitmapData, DeviceExt->NtfsInfo.ClusterCount);
|
||||
FreeClusters = RtlNumberOfClearBits(&Bitmap);
|
||||
|
||||
if( FreeClusters < DesiredClusters )
|
||||
Status = STATUS_DISK_FULL;
|
||||
if (FreeClusters < DesiredClusters)
|
||||
{
|
||||
ReleaseAttributeContext(DataContext);
|
||||
|
||||
ExFreePoolWithTag(BitmapData, TAG_NTFS);
|
||||
ExFreePoolWithTag(BitmapRecord, TAG_NTFS);
|
||||
return STATUS_DISK_FULL;
|
||||
}
|
||||
|
||||
// TODO: Observe MFT reservation zone
|
||||
|
||||
|
|
Loading…
Reference in a new issue