An IRP context without an IRP sounds like a challenge...

svn path=/trunk/; revision=67536
This commit is contained in:
Pierre Schweitzer 2015-05-03 18:13:16 +00:00
parent 11a3512389
commit f982ad2644

View file

@ -83,16 +83,10 @@ NtfsAllocateIrpContext(PDEVICE_OBJECT DeviceObject,
IrpContext->Identifier.Size = sizeof(NTFS_IRP_CONTEXT); IrpContext->Identifier.Size = sizeof(NTFS_IRP_CONTEXT);
IrpContext->Irp = Irp; IrpContext->Irp = Irp;
IrpContext->DeviceObject = DeviceObject; IrpContext->DeviceObject = DeviceObject;
if (Irp)
{
IoStackLocation = IoGetCurrentIrpStackLocation(Irp); IoStackLocation = IoGetCurrentIrpStackLocation(Irp);
ASSERT(IoStackLocation);
IrpContext->MajorFunction = IoStackLocation->MajorFunction; IrpContext->MajorFunction = IoStackLocation->MajorFunction;
IrpContext->MinorFunction = IoStackLocation->MinorFunction; IrpContext->MinorFunction = IoStackLocation->MinorFunction;
IrpContext->IsTopLevel = (IoGetTopLevelIrp() == Irp); IrpContext->IsTopLevel = (IoGetTopLevelIrp() == Irp);
}
return IrpContext; return IrpContext;
} }