Author: pschweitzer
Date: Sun Oct 26 18:48:30 2014
New Revision: 65024
URL:
http://svn.reactos.org/svn/reactos?rev=65024&view=rev
Log:
[FASTFAT]
Acquire DirResource in DoQuery() before attempting to play with FCBs.
This is dedicated to Thomas ;-)
Modified:
trunk/reactos/drivers/filesystems/fastfat/dir.c
Modified: trunk/reactos/drivers/filesystems/fastfat/dir.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/dir.c [iso-8859-1] Sun Oct 26 18:48:30 2014
@@ -504,6 +504,13 @@
DirContext.ShortNameU.Buffer = ShortNameBuffer;
DirContext.ShortNameU.MaximumLength = sizeof(ShortNameBuffer);
+ if (!ExAcquireResourceExclusiveLite(&IrpContext->DeviceExt->DirResource,
+ (BOOLEAN)(IrpContext->Flags &
IRPCONTEXT_CANWAIT)))
+ {
+ ExReleaseResourceLite(&pFcb->MainResource);
+ return VfatQueueRequest(IrpContext);
+ }
+
while ((Status == STATUS_SUCCESS) && (BufferLength > 0))
{
Status = FindFile(IrpContext->DeviceExt,
@@ -579,6 +586,7 @@
IrpContext->Irp->IoStatus.Information =
Stack->Parameters.QueryDirectory.Length - BufferLength;
}
+ ExReleaseResourceLite(&IrpContext->DeviceExt->DirResource);
ExReleaseResourceLite(&pFcb->MainResource);
return Status;