mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[FASTFAT] Don't delay any other close once shutdown has started
This commit is contained in:
parent
4fe7aafe10
commit
901c47ed14
4 changed files with 5 additions and 1 deletions
|
@ -183,7 +183,8 @@ VfatCloseFile(
|
|||
}
|
||||
|
||||
/* If we have to close immediately, or if delaying failed, close */
|
||||
if (!BooleanFlagOn(pFcb->Flags, FCB_DELAYED_CLOSE) || !NT_SUCCESS(VfatPostCloseFile(DeviceExt, FileObject)))
|
||||
if (VfatGlobalData->ShutdownStarted || !BooleanFlagOn(pFcb->Flags, FCB_DELAYED_CLOSE) ||
|
||||
!NT_SUCCESS(VfatPostCloseFile(DeviceExt, FileObject)))
|
||||
{
|
||||
VfatCommonCloseFile(DeviceExt, pFcb);
|
||||
}
|
||||
|
|
|
@ -101,6 +101,7 @@ DriverEntry(
|
|||
InitializeListHead(&VfatGlobalData->CloseListHead);
|
||||
VfatGlobalData->CloseCount = 0;
|
||||
VfatGlobalData->CloseWorkerRunning = FALSE;
|
||||
VfatGlobalData->ShutdownStarted = FALSE;
|
||||
VfatGlobalData->CloseWorkItem = IoAllocateWorkItem(DeviceObject);
|
||||
if (VfatGlobalData->CloseWorkItem == NULL)
|
||||
{
|
||||
|
|
|
@ -61,6 +61,7 @@ VfatShutdown(
|
|||
FsRtlEnterFileSystem();
|
||||
|
||||
/* FIXME: block new mount requests */
|
||||
VfatGlobalData->ShutdownStarted = TRUE;
|
||||
|
||||
if (DeviceObject == VfatGlobalData->DeviceObject)
|
||||
{
|
||||
|
|
|
@ -417,6 +417,7 @@ typedef struct
|
|||
LIST_ENTRY CloseListHead;
|
||||
BOOLEAN CloseWorkerRunning;
|
||||
PIO_WORKITEM CloseWorkItem;
|
||||
BOOLEAN ShutdownStarted;
|
||||
} VFAT_GLOBAL_DATA, *PVFAT_GLOBAL_DATA;
|
||||
|
||||
extern PVFAT_GLOBAL_DATA VfatGlobalData;
|
||||
|
|
Loading…
Reference in a new issue