- Only set the IOSB status if we complete the IRP
- Fix the assert: the caller might want not to complete the IRP nor to queue it (passed down IRPs)

svn path=/trunk/; revision=67636
This commit is contained in:
Pierre Schweitzer 2015-05-10 20:56:48 +00:00
parent 0c5f4d92cd
commit 07f38d007d

View file

@ -85,13 +85,17 @@ NtfsFsdDispatch(PDEVICE_OBJECT DeviceObject,
else
Status = STATUS_INSUFFICIENT_RESOURCES;
ASSERT(((IrpContext->Flags & IRPCONTEXT_COMPLETE) && !(IrpContext->Flags & IRPCONTEXT_QUEUE)) ||
ASSERT((!(IrpContext->Flags & IRPCONTEXT_COMPLETE) && !(IrpContext->Flags & IRPCONTEXT_QUEUE)) ||
((IrpContext->Flags & IRPCONTEXT_COMPLETE) && !(IrpContext->Flags & IRPCONTEXT_QUEUE)) ||
(!(IrpContext->Flags & IRPCONTEXT_COMPLETE) && (IrpContext->Flags & IRPCONTEXT_QUEUE)));
Irp->IoStatus.Status = Status;
if (IrpContext->Flags & IRPCONTEXT_COMPLETE)
{
Irp->IoStatus.Status = Status;
IoCompleteRequest(Irp, IrpContext->PriorityBoost);
}
if (IrpContext)
ExFreePoolWithTag(IrpContext, 'PRIN');