- Fix IopSecurityFile to send the IRP to the right device.
authorAlex Ionescu <aionescu@gmail.com>
Sun, 3 Dec 2006 18:04:32 +0000 (18:04 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Sun, 3 Dec 2006 18:04:32 +0000 (18:04 +0000)
- 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
reactos/ntoskrnl/io/iomgr/iofunc.c

index 0e34c71..0cc4648 100644 (file)
@@ -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;
index 3b97b5b..056788d 100644 (file)
@@ -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)