Author: pschweitzer
Date: Tue Feb 23 19:57:10 2016
New Revision: 70777
URL:
http://svn.reactos.org/svn/reactos?rev=70777&view=rev
Log:
[NTFS]
Moar locking
Modified:
trunk/reactos/drivers/filesystems/ntfs/cleanup.c
Modified: trunk/reactos/drivers/filesystems/ntfs/cleanup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/cleanup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/cleanup.c [iso-8859-1] Tue Feb 23 19:57:10
2016
@@ -106,7 +106,16 @@
FileObject = IrpContext->FileObject;
DeviceExtension = DeviceObject->DeviceExtension;
+ if (!ExAcquireResourceExclusiveLite(&DeviceExtension->DirResource,
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
+ {
+ return NtfsMarkIrpContextForQueue(IrpContext);
+ }
+
Status = NtfsCleanupFile(DeviceExtension, FileObject,
BooleanFlagOn(IrpContext->Flags, IRPCONTEXT_CANWAIT));
+
+ ExReleaseResourceLite(&DeviceExtension->DirResource);
+
if (Status == STATUS_PENDING)
{
return NtfsMarkIrpContextForQueue(IrpContext);