Author: dgorbachev
Date: Sun Apr 1 02:18:16 2007
New Revision: 26223
URL:
http://svn.reactos.org/svn/reactos?rev=26223&view=rev
Log:
Fix the bug introduced in r26219.
Modified:
trunk/reactos/drivers/filesystems/np/fsctrl.c
Modified: trunk/reactos/drivers/filesystems/np/fsctrl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/np/fsc…
==============================================================================
--- trunk/reactos/drivers/filesystems/np/fsctrl.c (original)
+++ trunk/reactos/drivers/filesystems/np/fsctrl.c Sun Apr 1 02:18:16 2007
@@ -81,6 +81,9 @@
NpfsConnectPipe(PIRP Irp,
PNPFS_CCB Ccb)
{
+ PIO_STACK_LOCATION IoStack;
+ PFILE_OBJECT FileObject;
+ ULONG Flags;
PLIST_ENTRY current_entry;
PNPFS_FCB Fcb;
PNPFS_CCB ClientCcb;
@@ -100,6 +103,9 @@
DPRINT("Waiting for connection...\n");
Fcb = Ccb->Fcb;
+ IoStack = IoGetCurrentIrpStackLocation(Irp);
+ FileObject = IoStack->FileObject;
+ Flags = FileObject->Flags;
/* search for a listening client fcb */
KeLockMutex(&Fcb->CcbListLock);
@@ -157,17 +163,13 @@
KeUnlockMutex(&Fcb->CcbListLock);
+ if (Flags & FO_SYNCHRONOUS_IO)
{
- PIO_STACK_LOCATION IoStack = IoGetCurrentIrpStackLocation(Irp);
- PFILE_OBJECT FileObject = IoStack->FileObject;
- if (FileObject->Flags & FO_SYNCHRONOUS_IO)
- {
- KeWaitForSingleObject(&Ccb->ConnectEvent,
- UserRequest,
- KernelMode,
- FALSE,
- NULL);
- }
+ KeWaitForSingleObject(&Ccb->ConnectEvent,
+ UserRequest,
+ KernelMode,
+ FALSE,
+ NULL);
}
DPRINT("NpfsConnectPipe() done (Status %lx)\n", Status);