From 2bda155345a42697ce38116811fa47d674c9044e Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Tue, 23 Feb 2016 19:57:10 +0000 Subject: [PATCH] [NTFS] Moar locking svn path=/trunk/; revision=70777 --- reactos/drivers/filesystems/ntfs/cleanup.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/reactos/drivers/filesystems/ntfs/cleanup.c b/reactos/drivers/filesystems/ntfs/cleanup.c index 4ac09f36618..b8227110fc8 100644 --- a/reactos/drivers/filesystems/ntfs/cleanup.c +++ b/reactos/drivers/filesystems/ntfs/cleanup.c @@ -106,7 +106,16 @@ NtfsCleanup(PNTFS_IRP_CONTEXT IrpContext) 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); -- 2.17.1