https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b326312d520ca913c59ed…
commit b326312d520ca913c59ed502ba25d4625a792f9d
Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Tue Jan 7 16:49:26 2020 +0100
Commit: Victor Perevertkin <victor(a)perevertkin.ru>
CommitDate: Mon Feb 17 19:08:57 2020 +0300
[KS] KsQueryInformationFile(): Fallback to IRP if FastIO failed
Or, if it succeeded, return the actual NTSTATUS, not an unrelated BOOLEAN.
Addendum to commit 4725a4fd9cb76e05ab5bb225e1f30bd94743e8d9 (r42117).
CORE-16618
---
drivers/ksfilter/ks/irp.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/drivers/ksfilter/ks/irp.c b/drivers/ksfilter/ks/irp.c
index 9205450eea8..ab5d1b21523 100644
--- a/drivers/ksfilter/ks/irp.c
+++ b/drivers/ksfilter/ks/irp.c
@@ -367,17 +367,31 @@ KsQueryInformationFile(
if (FileInformationClass == FileBasicInformation)
{
/* use FastIoQueryBasicInfo routine */
- if (FastIoDispatch->FastIoQueryBasicInfo)
+ if (FastIoDispatch->FastIoQueryBasicInfo != NULL &&
+ FastIoDispatch->FastIoQueryBasicInfo(
+ FileObject,
+ TRUE,
+ (PFILE_BASIC_INFORMATION)FileInformation,
+ &IoStatusBlock,
+ DeviceObject))
{
- return FastIoDispatch->FastIoQueryBasicInfo(FileObject, TRUE,
(PFILE_BASIC_INFORMATION)FileInformation, &IoStatusBlock, DeviceObject);
+ /* request was handled */
+ return IoStatusBlock.Status;
}
}
else if (FileInformationClass == FileStandardInformation)
{
/* use FastIoQueryStandardInfo routine */
- if (FastIoDispatch->FastIoQueryStandardInfo)
+ if (FastIoDispatch->FastIoQueryStandardInfo != NULL &&
+ FastIoDispatch->FastIoQueryStandardInfo(
+ FileObject,
+ TRUE,
+ (PFILE_STANDARD_INFORMATION)FileInformation,
+ &IoStatusBlock,
+ DeviceObject))
{
- return FastIoDispatch->FastIoQueryStandardInfo(FileObject, TRUE,
(PFILE_STANDARD_INFORMATION)FileInformation, &IoStatusBlock, DeviceObject);
+ /* request was handled */
+ return IoStatusBlock.Status;
}
}
}