https://git.reactos.org/?p=reactos.git;a=commitdiff;h=15b9a6aa4c131b99ada2b…
commit 15b9a6aa4c131b99ada2bccfe79e319e0daed750
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Wed Oct 3 21:28:11 2018 +0200
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Wed Oct 3 21:29:12 2018 +0200
[NTOSKRNL] Call IoCreateFileSpecifyDeviceObjectHint with the hint if it was specified
---
ntoskrnl/io/iomgr/iofunc.c | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/ntoskrnl/io/iomgr/iofunc.c b/ntoskrnl/io/iomgr/iofunc.c
index 2ee72479cf..58a6316751 100644
--- a/ntoskrnl/io/iomgr/iofunc.c
+++ b/ntoskrnl/io/iomgr/iofunc.c
@@ -905,14 +905,16 @@ IopOpenLinkOrRenameTarget(OUT PHANDLE Handle,
RenameInfo->RootDirectory,
NULL);
- /* And open its parent directory */
+ /* And open its parent directory
+ * Use hint if specified
+ */
if (FileObject->Flags & FO_FILE_OBJECT_HAS_EXTENSION)
{
+ PFILE_OBJECT_EXTENSION FileObjectExtension;
+
ASSERT(!(FileObject->Flags & FO_DIRECT_DEVICE_OPEN));
-#if 0
- /* Commented out - we don't support FO extension yet
- * FIXME: Corrected last arg when it's supported
- */
+
+ FileObjectExtension = FileObject->FileObjectExtension;
Status = IoCreateFileSpecifyDeviceObjectHint(&TargetHandle,
DesiredAccess | SYNCHRONIZE,
&ObjectAttributes,
@@ -927,12 +929,7 @@ IopOpenLinkOrRenameTarget(OUT PHANDLE Handle,
CreateFileTypeNone,
NULL,
IO_FORCE_ACCESS_CHECK |
IO_OPEN_TARGET_DIRECTORY | IO_NO_PARAMETER_CHECKING,
- FileObject->DeviceObject);
-#else
- ASSERT(FALSE);
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
-#endif
+
FileObjectExtension->TopDeviceObjectHint);
}
else
{