mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 20:15:59 +00:00
- Reference the file object in IopSecurityFile.
- Don't set FO_DIRECT_DEVICE_OPEN in IoCreateStreamFileObject. - Disabled the setting of IRP_NOCACHE, because vfat cannot handle cached and non cached requests for the same file. - Set the correct device object in NtWriteFile. svn path=/trunk/; revision=15381
This commit is contained in:
parent
1612126bbb
commit
7efa574035
1 changed files with 15 additions and 3 deletions
|
@ -344,6 +344,8 @@ IopSecurityFile(PVOID ObjectBody,
|
||||||
StackPtr->Parameters.SetSecurity.SecurityDescriptor = SecurityDescriptor;
|
StackPtr->Parameters.SetSecurity.SecurityDescriptor = SecurityDescriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ObReferenceObject(FileObject);
|
||||||
|
|
||||||
/* Call the Driver */
|
/* Call the Driver */
|
||||||
Status = IoCallDriver(FileObject->DeviceObject, Irp);
|
Status = IoCallDriver(FileObject->DeviceObject, Irp);
|
||||||
|
|
||||||
|
@ -1022,8 +1024,8 @@ IoCreateStreamFileObject(PFILE_OBJECT FileObject,
|
||||||
CreatedFileObject->Vpb = DeviceObject->Vpb;
|
CreatedFileObject->Vpb = DeviceObject->Vpb;
|
||||||
CreatedFileObject->Type = IO_TYPE_FILE;
|
CreatedFileObject->Type = IO_TYPE_FILE;
|
||||||
/* HACK */
|
/* HACK */
|
||||||
CreatedFileObject->Flags |= FO_DIRECT_DEVICE_OPEN;
|
//CreatedFileObject->Flags |= FO_DIRECT_DEVICE_OPEN;
|
||||||
//CreatedFileObject->Flags = FO_STREAM_FILE;
|
CreatedFileObject->Flags |= FO_STREAM_FILE;
|
||||||
|
|
||||||
/* Initialize Lock and Event */
|
/* Initialize Lock and Event */
|
||||||
KeInitializeEvent(&CreatedFileObject->Event, NotificationEvent, FALSE);
|
KeInitializeEvent(&CreatedFileObject->Event, NotificationEvent, FALSE);
|
||||||
|
@ -2536,7 +2538,12 @@ NtReadFile(IN HANDLE FileHandle,
|
||||||
Irp->Overlay.AsynchronousParameters.UserApcRoutine = ApcRoutine;
|
Irp->Overlay.AsynchronousParameters.UserApcRoutine = ApcRoutine;
|
||||||
Irp->Overlay.AsynchronousParameters.UserApcContext = ApcContext;
|
Irp->Overlay.AsynchronousParameters.UserApcContext = ApcContext;
|
||||||
Irp->Flags |= IRP_READ_OPERATION;
|
Irp->Flags |= IRP_READ_OPERATION;
|
||||||
|
#if 0
|
||||||
|
/* FIXME:
|
||||||
|
* Vfat doesn't handle non cached files correctly.
|
||||||
|
*/
|
||||||
if (FileObject->Flags & FO_NO_INTERMEDIATE_BUFFERING) Irp->Flags |= IRP_NOCACHE;
|
if (FileObject->Flags & FO_NO_INTERMEDIATE_BUFFERING) Irp->Flags |= IRP_NOCACHE;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Setup Stack Data */
|
/* Setup Stack Data */
|
||||||
StackPtr = IoGetNextIrpStackLocation(Irp);
|
StackPtr = IoGetNextIrpStackLocation(Irp);
|
||||||
|
@ -3114,7 +3121,7 @@ NtWriteFile (IN HANDLE FileHandle,
|
||||||
_SEH_TRY
|
_SEH_TRY
|
||||||
{
|
{
|
||||||
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_WRITE,
|
Irp = IoBuildSynchronousFsdRequest(IRP_MJ_WRITE,
|
||||||
FileObject->DeviceObject,
|
DeviceObject,
|
||||||
Buffer,
|
Buffer,
|
||||||
Length,
|
Length,
|
||||||
ByteOffset,
|
ByteOffset,
|
||||||
|
@ -3148,7 +3155,12 @@ NtWriteFile (IN HANDLE FileHandle,
|
||||||
Irp->Overlay.AsynchronousParameters.UserApcRoutine = ApcRoutine;
|
Irp->Overlay.AsynchronousParameters.UserApcRoutine = ApcRoutine;
|
||||||
Irp->Overlay.AsynchronousParameters.UserApcContext = ApcContext;
|
Irp->Overlay.AsynchronousParameters.UserApcContext = ApcContext;
|
||||||
Irp->Flags |= IRP_WRITE_OPERATION;
|
Irp->Flags |= IRP_WRITE_OPERATION;
|
||||||
|
#if 0
|
||||||
|
/* FIXME:
|
||||||
|
* Vfat doesn't handle non cached files correctly.
|
||||||
|
*/
|
||||||
if (FileObject->Flags & FO_NO_INTERMEDIATE_BUFFERING) Irp->Flags |= IRP_NOCACHE;
|
if (FileObject->Flags & FO_NO_INTERMEDIATE_BUFFERING) Irp->Flags |= IRP_NOCACHE;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Setup Stack Data */
|
/* Setup Stack Data */
|
||||||
StackPtr = IoGetNextIrpStackLocation(Irp);
|
StackPtr = IoGetNextIrpStackLocation(Irp);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue