From f982ad2644928f25315bdb05410be8533aecbd6d Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sun, 3 May 2015 18:13:16 +0000 Subject: [PATCH] [NTFS] An IRP context without an IRP sounds like a challenge... svn path=/trunk/; revision=67536 --- reactos/drivers/filesystems/ntfs/misc.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/reactos/drivers/filesystems/ntfs/misc.c b/reactos/drivers/filesystems/ntfs/misc.c index 5d17e1a07a4..128f787f237 100644 --- a/reactos/drivers/filesystems/ntfs/misc.c +++ b/reactos/drivers/filesystems/ntfs/misc.c @@ -83,16 +83,10 @@ NtfsAllocateIrpContext(PDEVICE_OBJECT DeviceObject, IrpContext->Identifier.Size = sizeof(NTFS_IRP_CONTEXT); IrpContext->Irp = Irp; IrpContext->DeviceObject = DeviceObject; - - if (Irp) - { - IoStackLocation = IoGetCurrentIrpStackLocation(Irp); - ASSERT(IoStackLocation); - - IrpContext->MajorFunction = IoStackLocation->MajorFunction; - IrpContext->MinorFunction = IoStackLocation->MinorFunction; - IrpContext->IsTopLevel = (IoGetTopLevelIrp() == Irp); - } + IoStackLocation = IoGetCurrentIrpStackLocation(Irp); + IrpContext->MajorFunction = IoStackLocation->MajorFunction; + IrpContext->MinorFunction = IoStackLocation->MinorFunction; + IrpContext->IsTopLevel = (IoGetTopLevelIrp() == Irp); return IrpContext; } -- 2.17.1