[NTFS]
authorPierre Schweitzer <pierre@reactos.org>
Mon, 25 May 2015 17:43:04 +0000 (17:43 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Mon, 25 May 2015 17:43:04 +0000 (17:43 +0000)
Fix MmGetSystemAddressForMdlSafe() call, as it was done in r67808

svn path=/trunk/; revision=67912

reactos/drivers/filesystems/ntfs/fsctl.c
reactos/drivers/filesystems/ntfs/misc.c
reactos/drivers/filesystems/ntfs/ntfs.h
reactos/drivers/filesystems/ntfs/rw.c

index 71a02a9..99f107e 100644 (file)
@@ -712,7 +712,7 @@ GetVolumeBitmap(PDEVICE_EXTENSION DeviceExt,
         return STATUS_BUFFER_TOO_SMALL;
     }
 
-    BitmapBuffer = NtfsGetUserBuffer(Irp);
+    BitmapBuffer = NtfsGetUserBuffer(Irp, FALSE);
     if (Irp->RequestorMode == UserMode)
     {
         _SEH2_TRY
index a163e0f..27bd34e 100644 (file)
@@ -117,11 +117,12 @@ NtfsFileFlagsToAttributes(ULONG NtfsAttributes,
 }
 
 PVOID
-NtfsGetUserBuffer(PIRP Irp)
+NtfsGetUserBuffer(PIRP Irp,
+                  BOOLEAN Paging)
 {
     if (Irp->MdlAddress != NULL)
     {
-        return MmGetSystemAddressForMdlSafe(Irp->MdlAddress, HighPagePriority);
+        return MmGetSystemAddressForMdlSafe(Irp->MdlAddress, (Paging ? HighPagePriority : NormalPagePriority));
     }
     else
     {
index 9bc263b..a18fbdc 100644 (file)
@@ -743,7 +743,8 @@ NtfsAllocateIrpContext(PDEVICE_OBJECT DeviceObject,
                        PIRP Irp);
 
 PVOID
-NtfsGetUserBuffer(PIRP Irp);
+NtfsGetUserBuffer(PIRP Irp,
+                  BOOLEAN Paging);
 
 #if 0
 BOOLEAN
index fa7aeb0..7387b85 100644 (file)
@@ -196,7 +196,7 @@ NtfsRead(PNTFS_IRP_CONTEXT IrpContext)
     DeviceExt = DeviceObject->DeviceExtension;
     ReadLength = Stack->Parameters.Read.Length;
     ReadOffset = Stack->Parameters.Read.ByteOffset;
-    Buffer = NtfsGetUserBuffer(Irp);
+    Buffer = NtfsGetUserBuffer(Irp, Irp->Flags & IRP_PAGING_IO);
 
     Status = NtfsReadFile(DeviceExt,
                           FileObject,