It is generally considered a good idea to release a fast mutex in the same order...
authorAlex Ionescu <aionescu@gmail.com>
Sun, 20 Nov 2005 08:46:09 +0000 (08:46 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Sun, 20 Nov 2005 08:46:09 +0000 (08:46 +0000)
svn path=/trunk/; revision=19357

reactos/drivers/fs/np/create.c

index 198b3d9..cb15109 100644 (file)
@@ -618,13 +618,13 @@ NpfsCleanup(PDEVICE_OBJECT DeviceObject,
       KeSetEvent(&OtherSide->WriteEvent, IO_NO_INCREMENT, FALSE);
       if (Server)
       {
+         ExReleaseFastMutex(&OtherSide->DataListLock);
          ExReleaseFastMutex(&Fcb->DataListLock);
-        ExReleaseFastMutex(&OtherSide->DataListLock);
       }
       else
       {
-        ExReleaseFastMutex(&OtherSide->DataListLock);
-        ExReleaseFastMutex(&Fcb->DataListLock);
+          ExReleaseFastMutex(&Fcb->DataListLock);
+          ExReleaseFastMutex(&OtherSide->DataListLock);
       }
    }
    else if (Fcb->PipeState == FILE_PIPE_LISTENING_STATE)