}
NTSTATUS NTAPI
-CdfsCleanup(PDEVICE_OBJECT DeviceObject,
- PIRP Irp)
+CdfsCleanup(
+ PCDFS_IRP_CONTEXT IrpContext)
{
+ PIRP Irp;
+ PDEVICE_OBJECT DeviceObject;
PDEVICE_EXTENSION DeviceExtension;
PIO_STACK_LOCATION Stack;
PFILE_OBJECT FileObject;
DPRINT("CdfsCleanup() called\n");
+ ASSERT(IrpContext);
+
+ Irp = IrpContext->Irp;
+ DeviceObject = IrpContext->DeviceObject;
+ Stack = IrpContext->Stack;
+
if (DeviceObject == CdfsGlobalData->DeviceObject)
{
DPRINT("Closing file system\n");
goto ByeBye;
}
- Stack = IoGetCurrentIrpStackLocation(Irp);
FileObject = Stack->FileObject;
DeviceExtension = DeviceObject->DeviceExtension;
ExReleaseResourceLite(&DeviceExtension->DirResource);
KeLeaveCriticalRegion();
-
ByeBye:
- Irp->IoStatus.Status = Status;
Irp->IoStatus.Information = 0;
- IoCompleteRequest(Irp, IO_NO_INCREMENT);
return(Status);
}