Fix copy-paste error in SetAttributeDataLength()

svn path=/branches/GSoC_2016/NTFS/; revision=71832
This commit is contained in:
Trevor Thompson 2016-07-06 07:57:57 +00:00 committed by Thomas Faber
parent 760cdfb5aa
commit 7eb1264f5f

View file

@ -228,9 +228,9 @@ SetAttributeDataLength(PFILE_OBJECT FileObject,
NTSTATUS Status = STATUS_SUCCESS; NTSTATUS Status = STATUS_SUCCESS;
// are we truncating the file? // are we truncating the file?
if (DataSize->QuadPart < AttributeDataLength(&AttrContext->Record) if (DataSize->QuadPart < AttributeDataLength(&AttrContext->Record))
{ {
if (!MmCanFileBeTruncated(FileObject->SectionObjectPointer, (PLARGE_INTEGER)&AllocationSize)) if (!MmCanFileBeTruncated(FileObject->SectionObjectPointer, DataSize))
{ {
DPRINT1("Can't truncate a memory-mapped file!\n"); DPRINT1("Can't truncate a memory-mapped file!\n");
return STATUS_USER_MAPPED_FILE; return STATUS_USER_MAPPED_FILE;