Author: pschweitzer Date: Sun May 3 18:17:39 2015 New Revision: 67538
URL: http://svn.reactos.org/svn/reactos?rev=67538&view=rev Log: [NTFS] Set a flag in the IRP context when an IRP can wait on locking
Modified: trunk/reactos/drivers/filesystems/ntfs/misc.c trunk/reactos/drivers/filesystems/ntfs/ntfs.h
Modified: trunk/reactos/drivers/filesystems/ntfs/misc.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/mi... ============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/misc.c [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/misc.c [iso-8859-1] Sun May 3 18:17:39 2015 @@ -88,6 +88,16 @@ IrpContext->MinorFunction = IoStackLocation->MinorFunction; IrpContext->IsTopLevel = (IoGetTopLevelIrp() == Irp);
+ if (IoStackLocation->MajorFunction == IRP_MJ_FILE_SYSTEM_CONTROL || + IoStackLocation->MajorFunction == IRP_MJ_DEVICE_CONTROL || + IoStackLocation->MajorFunction == IRP_MJ_SHUTDOWN || + (IoStackLocation->MajorFunction != IRP_MJ_CLEANUP && + IoStackLocation->MajorFunction != IRP_MJ_CLOSE && + IoIsOperationSynchronous(Irp))) + { + IrpContext->Flags |= IRPCONTEXT_CANWAIT; + } + return IrpContext; }
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/nt... ============================================================================== --- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original) +++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Sun May 3 18:17:39 2015 @@ -391,6 +391,8 @@ UCHAR Data[1]; } REPARSE_POINT_ATTRIBUTE, *PREPARSE_POINT_ATTRIBUTE;
+#define IRPCONTEXT_CANWAIT 0x1 + typedef struct { NTFSIDENTIFIER Identifier;