- /* Query the File name */
- if (PreviousMode == KernelMode &&
- BooleanFlagOn(FileObject->Flags, FO_SYNCHRONOUS_IO))
- {
- Status = IopGetFileInformation(FileObject,
- LengthMismatch ? Length : FileLength,
- FileNameInformation,
- LocalFileInfo,
- &LocalReturnLength);
- }
- else
- {
- Status = IoQueryFileInformation(FileObject,
- FileNameInformation,
- LengthMismatch ? Length : FileLength,
- LocalFileInfo,
- &LocalReturnLength);
- }
- if (NT_ERROR(Status))
- {
- /* Allow status that would mean it's not implemented in the storage stack */
- if (Status != STATUS_INVALID_PARAMETER && Status != STATUS_INVALID_DEVICE_REQUEST &&
- Status != STATUS_NOT_IMPLEMENTED && Status != STATUS_INVALID_INFO_CLASS)
+ /* Query the File name */
+ if (PreviousMode == KernelMode &&
+ BooleanFlagOn(FileObject->Flags, FO_SYNCHRONOUS_IO))