Author: pschweitzer
Date: Sun May 3 18:25:55 2015
New Revision: 67539
URL:
http://svn.reactos.org/svn/reactos?rev=67539&view=rev
Log:
[NTFS]
Store stack & FO in IRP context
Modified:
trunk/reactos/drivers/filesystems/ntfs/misc.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.h
Modified: trunk/reactos/drivers/filesystems/ntfs/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/m…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/misc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/misc.c [iso-8859-1] Sun May 3 18:25:55 2015
@@ -67,7 +67,6 @@
PIRP Irp)
{
PNTFS_IRP_CONTEXT IrpContext;
- PIO_STACK_LOCATION IoStackLocation;
TRACE_(NTFS, "NtfsAllocateIrpContext()\n");
@@ -83,16 +82,17 @@
IrpContext->Identifier.Size = sizeof(NTFS_IRP_CONTEXT);
IrpContext->Irp = Irp;
IrpContext->DeviceObject = DeviceObject;
- IoStackLocation = IoGetCurrentIrpStackLocation(Irp);
- IrpContext->MajorFunction = IoStackLocation->MajorFunction;
- IrpContext->MinorFunction = IoStackLocation->MinorFunction;
+ IrpContext->Stack = IoGetCurrentIrpStackLocation(Irp);
+ IrpContext->MajorFunction = IrpContext->Stack->MajorFunction;
+ IrpContext->MinorFunction = IrpContext->Stack->MinorFunction;
+ IrpContext->FileObject = IrpContext->Stack->FileObject;
IrpContext->IsTopLevel = (IoGetTopLevelIrp() == Irp);
- if (IoStackLocation->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL ||
- IoStackLocation->MajorFunction == IRP_MJ_DEVICE_CONTROL ||
- IoStackLocation->MajorFunction == IRP_MJ_SHUTDOWN ||
- (IoStackLocation->MajorFunction != IRP_MJ_CLEANUP &&
- IoStackLocation->MajorFunction != IRP_MJ_CLOSE &&
+ if (IrpContext->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL ||
+ IrpContext->MajorFunction == IRP_MJ_DEVICE_CONTROL ||
+ IrpContext->MajorFunction == IRP_MJ_SHUTDOWN ||
+ (IrpContext->MajorFunction != IRP_MJ_CLEANUP &&
+ IrpContext->MajorFunction != IRP_MJ_CLOSE &&
IoIsOperationSynchronous(Irp)))
{
IrpContext->Flags |= IRPCONTEXT_CANWAIT;
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Sun May 3 18:25:55 2015
@@ -397,12 +397,14 @@
{
NTFSIDENTIFIER Identifier;
ULONG Flags;
+ PIO_STACK_LOCATION Stack;
UCHAR MajorFunction;
UCHAR MinorFunction;
WORK_QUEUE_ITEM WorkQueueItem;
PIRP Irp;
BOOLEAN IsTopLevel;
PDEVICE_OBJECT DeviceObject;
+ PFILE_OBJECT FileObject;
NTSTATUS SavedExceptionCode;
} NTFS_IRP_CONTEXT, *PNTFS_IRP_CONTEXT;