mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 05:52:57 +00:00
[NTFS] - Fix index entries storing the wrong allocated file size when the file is resident. Fix a typo in a DPRINT.
svn path=/branches/GSoC_2016/NTFS/; revision=75479
This commit is contained in:
parent
92d1f92a61
commit
f2e47474f0
3 changed files with 6 additions and 7 deletions
|
@ -432,11 +432,8 @@ NTSTATUS NtfsWriteFile(PDEVICE_EXTENSION DeviceExt,
|
|||
|
||||
DataSize.QuadPart = WriteOffset + Length;
|
||||
|
||||
AllocationSize = ROUND_UP(DataSize.QuadPart, Fcb->Vcb->NtfsInfo.BytesPerCluster);
|
||||
|
||||
// set the attribute data length
|
||||
Status = SetAttributeDataLength(FileObject, Fcb, DataContext, AttributeOffset, FileRecord, &DataSize);
|
||||
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
ReleaseAttributeContext(DataContext);
|
||||
|
@ -445,6 +442,8 @@ NTSTATUS NtfsWriteFile(PDEVICE_EXTENSION DeviceExt,
|
|||
return Status;
|
||||
}
|
||||
|
||||
AllocationSize = AttributeAllocatedLength(&DataContext->Record);
|
||||
|
||||
// now we need to update this file's size in every directory index entry that references it
|
||||
// TODO: put this code in its own function and adapt it to work with every filename / hardlink
|
||||
// stored in the file record.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue