mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
Fixed synchronous I/O bug in ZwWriteFile
svn path=/trunk/; revision=74
This commit is contained in:
@@ -112,7 +112,7 @@ NTSTATUS ZwReadFile(HANDLE FileHandle,
|
||||
|
||||
DPRINT("FileObject->DeviceObject %x\n",FileObject->DeviceObject);
|
||||
Status = IoCallDriver(FileObject->DeviceObject,Irp);
|
||||
if (Status == STATUS_PENDING)
|
||||
if (Status == STATUS_PENDING && (FileObject->Flags & FO_SYNCHRONOUS_IO))
|
||||
{
|
||||
KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL);
|
||||
Status = Irp->IoStatus.Status;
|
||||
@@ -198,6 +198,7 @@ NTSTATUS ZwWriteFile(HANDLE FileHandle,
|
||||
KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL);
|
||||
Status = Irp->IoStatus.Status;
|
||||
}
|
||||
|
||||
return(Status);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user