diff --git a/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp b/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp index 08fecc1216..c9b14ba2db 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp @@ -187,6 +187,21 @@ AFSCommonCreate( IN PDEVICE_OBJECT DeviceObject, (ULONGLONG)PsGetCurrentThreadId(), &stAuthGroup); + // + // If we are in shutdown mode then fail the request + // + + if( BooleanFlagOn( pDeviceExt->DeviceFlags, AFS_DEVICE_FLAG_REDIRECTOR_SHUTDOWN)) + { + + AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING, + AFS_TRACE_LEVEL_WARNING, + "AFSCommonCreate (%08lX) Open request after shutdown\n", + Irp); + + try_return( ntStatus = STATUS_TOO_LATE); + } + if( !BooleanFlagOn( AFSGlobalRoot->ObjectInformation.Flags, AFS_OBJECT_FLAGS_DIRECTORY_ENUMERATED)) { @@ -204,21 +219,6 @@ AFSCommonCreate( IN PDEVICE_OBJECT DeviceObject, } } - // - // If we are in shutdown mode then fail the request - // - - if( BooleanFlagOn( pDeviceExt->DeviceFlags, AFS_DEVICE_FLAG_REDIRECTOR_SHUTDOWN)) - { - - AFSDbgLogMsg( AFS_SUBSYSTEM_FILE_PROCESSING, - AFS_TRACE_LEVEL_WARNING, - "AFSCommonCreate (%08lX) Open request after shutdown\n", - Irp); - - try_return( ntStatus = STATUS_TOO_LATE); - } - // // Go and parse the name for processing. // If ulParseFlags is returned with AFS_PARSE_FLAG_FREE_FILE_BUFFER set,