From 144e232b5f07152816a58a2bf6b9308e3eebb982 Mon Sep 17 00:00:00 2001 From: Alex Ionescu Date: Sun, 3 Dec 2006 18:04:32 +0000 Subject: [PATCH] - Fix IopSecurityFile to send the IRP to the right device. - Fix IoSetInformation to send the IRP to the right device. - After the major fix in 24996, the functions that had been written to work with the I/O bug stopped working (by sending the IRP to the wrong device object, which, due to the bug was the ""right"" object), this is now fixed and the bootcd works again. svn path=/trunk/; revision=25037 --- reactos/ntoskrnl/io/iomgr/file.c | 7 +++++-- reactos/ntoskrnl/io/iomgr/iofunc.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/io/iomgr/file.c b/reactos/ntoskrnl/io/iomgr/file.c index 0e34c71d908..0cc4648b772 100644 --- a/reactos/ntoskrnl/io/iomgr/file.c +++ b/reactos/ntoskrnl/io/iomgr/file.c @@ -655,7 +655,6 @@ IopDeleteFile(IN PVOID ObjectBody) /* Set up Stack Pointer Data */ StackPtr = IoGetNextIrpStackLocation(Irp); StackPtr->MajorFunction = IRP_MJ_CLOSE; - StackPtr->DeviceObject = DeviceObject; StackPtr->FileObject = FileObject; /* Queue the IRP */ @@ -686,6 +685,8 @@ IopDeleteFile(IN PVOID ObjectBody) ObDereferenceObject(FileObject->CompletionContext->Port); ExFreePool(FileObject->CompletionContext); } + + /* FIXME: Dereference device object */ } } @@ -839,7 +840,7 @@ IopSecurityFile(IN PVOID ObjectBody, IopUpdateOperationCount(IopOtherTransfer); /* Call the Driver */ - Status = IoCallDriver(FileObject->DeviceObject, Irp); + Status = IoCallDriver(DeviceObject, Irp); /* Check if this was async I/O */ if (LocalEvent) @@ -1537,6 +1538,8 @@ IoCreateStreamFileObject(IN PFILE_OBJECT FileObject, &FileHandle); CreatedFileObject->Flags |= FO_HANDLE_CREATED; + /* FIXME: Reference VPB */ + /* Close the extra handle and return file */ NtClose(FileHandle); return CreatedFileObject; diff --git a/reactos/ntoskrnl/io/iomgr/iofunc.c b/reactos/ntoskrnl/io/iomgr/iofunc.c index 3b97b5bf8c4..056788d5be8 100644 --- a/reactos/ntoskrnl/io/iomgr/iofunc.c +++ b/reactos/ntoskrnl/io/iomgr/iofunc.c @@ -697,7 +697,7 @@ IoSetInformation(IN PFILE_OBJECT FileObject, //IopQueueIrpToThread(Irp); /* Call the Driver */ - Status = IoCallDriver(FileObject->DeviceObject, Irp); + Status = IoCallDriver(DeviceObject, Irp); /* Check if this was synch I/O */ if (!LocalEvent)