Author: pschweitzer
Date: Sun May 17 12:22:28 2015
New Revision: 67808
URL:
http://svn.reactos.org/svn/reactos?rev=67808&view=rev
Log:
[FASTFAT]
Fix a fixme in VfatGetUserBuffer():
Only request high priority page when in the paging path. Otherwise, request normal
priority
Modified:
trunk/reactos/drivers/filesystems/fastfat/dir.c
trunk/reactos/drivers/filesystems/fastfat/misc.c
trunk/reactos/drivers/filesystems/fastfat/rw.c
trunk/reactos/drivers/filesystems/fastfat/vfat.h
Modified: trunk/reactos/drivers/filesystems/fastfat/dir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] Sun May 17 12:22:28 2015
@@ -419,7 +419,7 @@
ProbeForWrite(IrpContext->Irp->UserBuffer, BufferLength, 1);
}
#endif
- Buffer = VfatGetUserBuffer(IrpContext->Irp);
+ Buffer = VfatGetUserBuffer(IrpContext->Irp, FALSE);
if (!ExAcquireResourceSharedLite(&pFcb->MainResource,
(BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
Modified: trunk/reactos/drivers/filesystems/fastfat/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/misc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/misc.c [iso-8859-1] Sun May 17 12:22:28
2015
@@ -327,15 +327,14 @@
PVOID
VfatGetUserBuffer(
- IN PIRP Irp)
+ IN PIRP Irp,
+ IN BOOLEAN Paging)
{
ASSERT(Irp);
if (Irp->MdlAddress)
{
- /* This call may be in the paging path, so use maximum priority */
- /* FIXME: call with normal priority in the non-paging path */
- return MmGetSystemAddressForMdlSafe(Irp->MdlAddress, HighPagePriority);
+ return MmGetSystemAddressForMdlSafe(Irp->MdlAddress, (Paging ?
HighPagePriority : NormalPagePriority));
}
else
{
Modified: trunk/reactos/drivers/filesystems/fastfat/rw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] Sun May 17 12:22:28 2015
@@ -655,7 +655,7 @@
}
}
- Buffer = VfatGetUserBuffer(IrpContext->Irp);
+ Buffer = VfatGetUserBuffer(IrpContext->Irp, IrpContext->Irp->Flags &
IRP_PAGING_IO);
if (!Buffer)
{
Status = STATUS_INVALID_USER_BUFFER;
@@ -926,7 +926,7 @@
OldFileSize = Fcb->RFCB.FileSize;
- Buffer = VfatGetUserBuffer(IrpContext->Irp);
+ Buffer = VfatGetUserBuffer(IrpContext->Irp, IrpContext->Irp->Flags &
IRP_PAGING_IO);
if (!Buffer)
{
Status = STATUS_INVALID_USER_BUFFER;
Modified: trunk/reactos/drivers/filesystems/fastfat/vfat.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/vfat.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/vfat.h [iso-8859-1] Sun May 17 12:22:28
2015
@@ -928,7 +928,8 @@
PVOID
VfatGetUserBuffer(
- IN PIRP);
+ IN PIRP,
+ IN BOOLEAN Paging);
NTSTATUS
VfatLockUserBuffer(