Author: pschweitzer
Date: Tue Feb 23 20:45:11 2016
New Revision: 70778
URL:
http://svn.reactos.org/svn/reactos?rev=70778&view=rev
Log:
[NTFS]
Moar locking
Any resemblance to previous commit, living or dead, is purely coincidental
Modified:
trunk/reactos/drivers/filesystems/ntfs/close.c
Modified: trunk/reactos/drivers/filesystems/ntfs/close.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/close.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/close.c [iso-8859-1] Tue Feb 23 20:45:11 2016
@@ -101,7 +101,20 @@
FileObject = IrpContext->FileObject;
DeviceExtension = DeviceObject->DeviceExtension;
+ if (!ExAcquireResourceExclusiveLite(&DeviceExtension->DirResource,
+ BooleanFlagOn(IrpContext->Flags,
IRPCONTEXT_CANWAIT)))
+ {
+ return NtfsMarkIrpContextForQueue(IrpContext);
+ }
+
Status = NtfsCloseFile(DeviceExtension, FileObject);
+
+ ExReleaseResourceLite(&DeviceExtension->DirResource);
+
+ if (Status == STATUS_PENDING)
+ {
+ return NtfsMarkIrpContextForQueue(IrpContext);
+ }
IrpContext->Irp->IoStatus.Information = 0;
return Status;