Author: pschweitzer
Date: Thu Feb 25 20:49:31 2016
New Revision: 70787
URL:
http://svn.reactos.org/svn/reactos?rev=70787&view=rev
Log:
[NTFS]
Add a missing lock
Modified:
trunk/reactos/drivers/filesystems/ntfs/dirctl.c
Modified: trunk/reactos/drivers/filesystems/ntfs/dirctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/dirctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/dirctl.c [iso-8859-1] Thu Feb 25 20:49:31 2016
@@ -363,6 +363,13 @@
DPRINT("Buffer=%p tofind=%S\n", Buffer, Ccb->DirectorySearchPattern);
+ if (!ExAcquireResourceExclusiveLite(&DeviceExtension->DirResource,
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
+ {
+ ExReleaseResourceLite(&Fcb->MainResource);
+ return STATUS_PENDING;
+ }
+
while (Status == STATUS_SUCCESS && BufferLength > 0)
{
Status = NtfsFindFileAt(DeviceExtension,
@@ -469,6 +476,7 @@
Buffer0->NextEntryOffset = 0;
}
+ ExReleaseResourceLite(&DeviceExtension->DirResource);
ExReleaseResourceLite(&Fcb->MainResource);
if (FileIndex > 0)